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
Post a Comment