roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

docker in docker - how to label them "chlild-of.." and add networks ?

Open MarcWeber opened this issue 5 months ago • 0 comments

I found a project which wants to run a postgres docker instance. And I wanted to put it into docker itself. So I was faced with docker in docker situation.

Readings: https://stackoverflow.com/questions/27879713/is-it-ok-to-run-docker-from-inside-docker https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

Summing up eventually having sibling dockers and mounting the docker socket is recommended solution. But how to tell something in docker to attach a network to all created containers and how to know which are child-siblings ? Because others might have similar requirements it might make sense to have somewhat inoffecial standard. Eg defining an env var developers can use would fix it:

EXTRA_DOCKER_CONFIG='{"extra-run-args": ["--network", "skyvern-shared-network"], "name-prefix": "skyvern-child-sibling"]}'

Another option would be : /etc/docker/daemon.json

Now idea whether https://github.com/nestybox/sysbox is a better option yet.

So this github issues should serve being found by Google so that people with more knowledge can agree or point out alternatives.

While docker API libraries and exectuables could be patched how to take care of the names ? Cause applications need to know if they change.

So a proper solution eventually would mean attaching tags to dockers rather than prefixing names then all docker tools could filter/limit or attach tags automatically making usage somewhat transparent.

MarcWeber avatar Sep 12 '25 09:09 MarcWeber