Skip to content
This repository has been archived by the owner. 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 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

@jpetazzo jpetazzo commented Jul 29, 2015

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 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 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 Sep 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.