Skip to main content

Mount Volumes

Mount Volumes

If your container needs to access files on the host machine, a mount point can be created within your container using the Docker --volume option. For example:

# icm run container fred image hello-world options "--volume /dev2:/dev2"

This makes the contents of directory /dev2 on the host available at mount point /dev2 within the container:


# icm ssh -command "touch /dev2/example.txt"  // on the host
# icm exec -command "ls /dev2"                // in the container
example.txt

FeedbackOpens in a new tab