Theory
There is no way to actually run a docker daemon
in a container, but we can pass docker cli and docker daemon through volume mirroring.
Example
Let’s run a container along with those we need mirrored.
1 | docker run -it \ |
Inside this container we can actually call the docker cli
.
1 | [email protected]:/# docker info |
Use Case
The reason for me to do this is that I want to call docker cli in a gitlab-runner/docker executor during pipeline. The executor itself is a docker container.
Thus, I configured the runner this way:
1 | [[runners]] |