Docker volumes - not working when running container with -H-flat
Looking at the shipyard, I noticed that the deployment container runs containers on the host (redis, router, database, load balancer, shipyard) This is done with the -H flag.
So, I decided to try this for deploying my applications as it will make deployment easier (versus systemd, init.d). I was able to get about 70% but the tag - volumes-from broke .
The container starts up, but the volume it installs is empty. I have a simple example posted here.
If you run these commands on the host. it works great.
on_host$ docker run --name data joshuacalloway/data on_host$ docker run --volumes-from data ubuntu cat /data/hello.txt
However, if you do this in a container. It's broken.
on_host$ docker run -it --entrypoint=/bin/bash -v /var/run/docker.sock:/var/run/docker.sock joshuacalloway/deploy -s
in_container:/# docker ps -----> this shows docker processes on the host
in_container:/# docker rm data ---> this removes docker container data that was created above
in_container:/# docker run --name data joshuacalloway/data
in_container:/# docker run --volumes-from data ubuntu cat /data/hello.txt
+3
source to share
No one has answered this question yet
Check out similar questions: