Forked and based on official docker:dind image with an added SSH server.
- configuring and SSH key using ENV
AUTHORIZED_KEYS
- you need to have the public key here, not the path to the public key
- Mount your local docker socket into the container to
/var/run/docker.sock
- add the
COMMAND
docker
This will run the image, start the SSHD daemon and let the docker
command talk to your host docker engine
- use
privileged: true
when you start the container - configuring and the docker client config (/root/.docker/config.json) key using ENV
DOCKER_CLIENT_CONFIG_JSON
This way you run a fresh, isolated docker engine inside the container (real dind)
Please see run.sh
for the possible options or the official https://hub.docker.com/_/docker/
/ https://github.com/danielguerra69/docker-dind-sshd/blob/master/dockerd-entrypoint.sh
for dind
options