Sign inSign up

neshkeev/dind

By neshkeev

•Updated over 2 years ago

Image
0

388

neshkeev/dind repository overview

⁠Docker-In-Docker

Docker-In-Docker⁠ is an image that allows executing docker commands from inside a docker container.

The main differences from the official one⁠ are:

  • docker compose is built in
  • SSH server

This image might come in handy in complex docker compose environments where a dedicated docker container needs to manage the other containers. The container can connect to the dind container through SSH and and execute docker commands.

The Dockerfile⁠ can be found on GitHub⁠

⁠Quick Start

  1. (Optional) If you are on Windows:
export MSYS_NO_PATHCONV=1
  1. Create a directory:
mkdir example
  1. Enter the created directory:
cd example
  1. Download docker-compose.yml:
curl -LO https://raw.githubusercontent.com/neshkeev/containers/master/dind/example/docker-compose.yml
  1. Start the docker compose services:
docker compose up -d
  1. Run the hello-world services from the dind container:
docker compose exec -it dind docker run hello-world
  1. Check the status of the current docker compose setup from inside the dind container:
docker compose exec -it dind docker compose -f /root/example/docker-compose.yml ps
  1. Check the status of the current docker compose setup via SSH:
docker compose exec -it dind ssh root@localhost 'docker compose -f /root/example/docker-compose.yml ps'

⁠Known Issues

⁠A dind container's SSH server crushes on restart

Solution: remove the container and start it again

Tag summary

Content type

Image

Digest

sha256:d130cc00d…

Size

137.1 MB

Last updated

over 2 years ago

docker pull neshkeev/dind