Container

Docker-dind Playground

Docker-in-Docker: run a full Docker daemon inside your playground container. Build images, run containers, and practice Docker commands in a real engine..

Get access to the Docker-dind playground with one click

Welcome to the Docker-in-Docker Playground!

A complete Docker Engine running inside a container — build images, run containers, write Dockerfiles, and practice every Docker command in a real, isolated sandbox.

What’s Pre-installed

  • Docker Engine (dockerd) — starts automatically in background
  • Docker CLI with alias d
  • Socket: unix:///var/run/docker.sock

Quick Start

docker info
docker run hello-world
docker ps -a
docker images

Common Workflows

# Build an image from a Dockerfile
cat > Dockerfile <<'EOF'
FROM alpine:3.21
RUN apk add --no-cache curl
CMD ["curl", "--version"]
EOF
docker build -t myimage .
docker run myimage

# Run with port mapping and volume
docker run -d -p 8080:80 -v /tmp:/usr/share/nginx/html nginx
curl http://localhost:8080

# Inspect and manage
docker inspect <container-id>
docker logs -f <container-id>
docker exec -it <container-id> sh

Advanced Tips

# Multi-stage build
cat > Dockerfile <<'EOF'
FROM golang:1.22 AS builder
WORKDIR /app
RUN echo 'package main; import "fmt"; func main() { fmt.Println("hello") }' > main.go
RUN CGO_ENABLED=0 go build -o /hello

FROM scratch
COPY --from=builder /hello /hello
CMD ["/hello"]
EOF
docker build -t hello-scratch .
docker images hello-scratch

# Resource limits
docker run --memory=128m --cpus=0.5 nginx

# Cleanup
docker system prune -f

Session Notes

  • Session lasts 1 hour. Containers you create inside expire with the session.
  • This container runs in privileged mode to enable nested Docker.