Ask HN: Ways to run container inside container for development purpose?
I want to use containers as my development environment, but sometimes I need to use Docker. I’ve heard that running Docker inside container is a pain to set up.
What are good ways to run container inside container for development purpose?
8 comments
[ 37.0 ms ] story [ 905 ms ] threadExample: https://gitlab.com/hesamian/milwaukee-internationals-dotnet/...
Run docker insider docker. I use this in gitlab.ci to build docker image and push the build docker image to docker hub/heroku docker image hub.
I never bothered with the first.
For the second is enough to mount the docker socket from the HOST machine inside your host container (and obviously have the docker client available in your host container). I'm using this in our bitbucket pipelines (there is a setting in the pipeline config that mounts the socket for you).
1. https://blog.nestybox.com/2019/11/11/docker-sandbox.html