docker - How to mount data volume outside container? -


i have make container in directory , mount in b directory /home/b. how mount container in b can read files b. want make 1 container in directory , need read files of b directory mounting it. here have wrote in dockerfile

from python:2.7-slim  workdir /app add . /app  run ls  

docker run --name=container1 -v /home/b:/common_dir <image_name> docker run --name=container2 -v /home/b:/common_dir <image2_name> 

after have 2 running containers common folder /home/b on host both 2 containers can read/write /home/b


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -