Docker in Docker (DID) for bitbucket pipelines?

Geoff Williams September 19, 2017

Hi,

Does anyone know a way to run Docker in Docker (docker run inside a pipeline... ) for bitbucket pipelines? 

I have a test framework that expects to be able to use docker run while testing but of course this fails since its trying to run in an unprivileged container.  To be clear, if the container is able to install and run its own docker daemon that would be perfect, there is no need or desire to run commands against the docker container that runs the pipeline itself.

I found some notes [1] that say running against your own docker daemon is allowed but how to set this up?

 

Thanks,

Geoff

 

[1] https://confluence.atlassian.com/bitbucket/run-docker-commands-in-bitbucket-pipelines-879254331.html

1 answer

1 vote
rainbowstack April 25, 2019

I know this is super outdated but just for completeness sake. If you use docker in docker it does not create its own deamon! The way it works is that you expose the host deamon to dind as volume and dind uses this deamon and does not create its own. That is why containers spawn by a dind container are no child container but siblings.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events