8 ms·
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?
- amir734jj 4y agodind: https://hub.docker.com/_/docker https://hub.docker.com/_/docker Example: https://gitlab.com/hesamian/milwaukee-internationals-dotnet/-/blob/master/.gitlab-ci.yml 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.
- nprateem 4y agoDind has security risks. Kaniko is a better option
- quickthrower2 4y agoDocker compose? Compose your dev environment docker with other containers you need. Means you need to communicate with them over a local virtual network though. But that is probably OK for most things?
- fuero 4y agoPodman https://podman.io/ https://podman.io/ works fine, I use it to build container images on Kubernetes.
- dvnguyen 4y agoDo you run Docker inside Podman, Podman inside Docker, or Podman inside Podman?
- pbalau 4y agoThere are two concepts here: running the docker daemon inside your host container AND running only the docker client inside the host container. 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).
- deleted 4y ago[deleted]
- ashishbijlani 4y agoTake a look at Nestybox's DID use case [1]. They got acquired by Docker 1. https://blog.nestybox.com/2019/11/11/docker-sandbox.html https://blog.nestybox.com/2019/11/11/docker-sandbox.html