Can I configure the following to be able to execute a docker run
from inside a container? Running balenaOS with several containers…
[The] simplest way is to just expose the Docker socket to your CI container, by bind-mounting it with the -v
flag.
Simply put, when you start your CI container (Jenkins or other), instead of hacking something together with Docker-in-Docker, start it with:
docker run -v /var/run/docker.sock:/var/run/docker.sock ...
Now this container will have access to the Docker socket, and will therefore be able to start containers. Except that instead of starting “child” containers, it will start “sibling” containers.