New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mounted host volume empty when daemon outside dind #78

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

Comments

Projects
None yet
1 participant
@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

This comment has been minimized.

Show comment
Hide comment
@jpetazzo

jpetazzo Jul 29, 2015

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost 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.

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

This comment has been minimized.

Show comment
Hide comment
@jpetazzo

jpetazzo Sep 3, 2015

Owner

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!

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 Sep 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment