November 2017
Intermediate to advanced
298 pages
7h 10m
English
We have seen these earlier, but maybe we did not know what they are. Bind mounts take a specific file or folder and mount it within the container sandbox at a specified location, separated by :. The general syntax that we have used so far for this should look similar to the following:
$ docker run <run_params> \ -v /path/on/host:/path/on/container \ <image>...
Newer Docker syntax for this functionality is making its way into becoming a standard where the -v and --volume is now being replaced with --mount, so you should get used to that syntax too. In fact, from here on out, we will use both as much as we can so that you are comfortable with either style, but at the time of writing this book, --mount is not yet as fully functional ...
Read now
Unlock full access