November 2017
Intermediate to advanced
388 pages
8h 46m
English
Syntax: docker run -it -v <local_mount_point>:<container_mount_point> <image> <entrypoint>
# cd /root/DevOps# touch file{1..10}.txt# ls /root/DevOps# docker run -it -v /root/DevOps:/tmp ubuntu /bin/bash

The preceding command first lists the files of the local directory, and after mounting it to container mount point, it lists the files of the container mount point. We can see that both local and and container directory include the same file, because the container mounted its folder with the local host machine folder.
Read now
Unlock full access