Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

mounted host volume empty when daemon outside dind #78

Closed
ghost opened this issue Jul 25, 2015 · 3 comments
Closed

mounted host volume empty when daemon outside dind #78

ghost opened this issue Jul 25, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 25, 2015

I develop 'app' on an OSX laptop ('host') that runs a docker-daemon inside VirtualBox ('dev') (created via docker-machine). As my ci/cd utility ('rouster') grows, so do its dependencies. To encapsulate them, I've created an image ('rind'), which inherits from dind.

Happily, I can mount ~/src from host to rind and mount it again from rind to app and it works.

Presently, I use both eval $(docker-machine env dev) && rind deploy and $(docker-machine env prod) && rind deploy.

Uncertain that prod should run dind, I repointed rind's client at dev's daemon by setting env_vars ( DOCKER_CERT_PATH, DOCKER_TLS_VERIFY, DOCKER_HOST, and DOCKER_MACHINE_NAME).

Sadly, app now sees the mounted volumes, but they have no contents.

Thank you for these terrific tools and for any advice you may have.

@jpetazzo
Copy link
Owner

I suppose that your CI/CD utility (rouster) uses Docker, right? That's why you're using dind in the first place?

@ghost
Copy link
Author

ghost commented Jul 30, 2015

Correct. Rouster uses both Docker and Docker-Compose.
If at all possible, I'd love to use the docker-client within docker (rind) and use the docker-daemon that runs in my VirtualBox ('dev'). Unfortunately, the host->rind->app mounts only contain files when rind's docker-client references rind's (dind's) docker-daemon.

@jpetazzo
Copy link
Owner

jpetazzo commented Sep 3, 2015

I wrote a blog post about that kind of use-case:

http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

I hope it helps!

@jpetazzo jpetazzo closed this as completed Sep 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant