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.

http://goo.gl/a558XL

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
linux docker


source to share


No one has answered this question yet

Check out similar questions:

3382
How is Docker different from a virtual machine?
1330
Copy files from host to Docker container
1182
Copying files from Docker container to hosting
1175
How do I get the IP address of the Docker container from the host?
1148
How to remove old Docker containers
1120
How to copy Docker images from one host to another without using a repository
1107
From within a Docker container, how do I connect to the localhost of the machine?
890
How to list containers in Docker
755
How to work with persistent storage (like databases) in docker
322
What's the (best) way to manage permissions for Docker Shared Volumes?



All Articles
Loading...
X
Show
Funny
Dev
Pics