Interactive container simulator + 30 command reference. Start with Write Dockerfile.
only your code
complete kernel + all libs
emulates hardware for the VM
Windows / macOS / Linux
CPU · RAM · Disk
⏱ Boot: ~1–2 min · 💾 Each VM carries a full OS — slow, bloated, resource-hungry.
web
node:20
:3000
api
python:3
:8000
db
postgres
:5432
lightweight runtime — shares the host kernel, no Guest OS needed
Windows / macOS / Linux — one kernel for all containers
CPU · RAM · Disk
⚡ Start: <1 sec · 🪶 Containers share the OS kernel — tiny, portable, disposable.
Image
A read-only blueprint — like a class in OOP. Contains your app + all dependencies, frozen and reproducible.
Container
A running instance of an image — like an object from a class. Isolated process, ephemeral, and disposable.
Registry
A store for images. Docker Hub is the public one. Pull official images (nginx, postgres, node) or push your own.
Project Files
Dockerfile + source
No Dockerfile yet — click "Write Dockerfile" above
Local Images
docker images
No images — build or pull one
Containers
docker ps
No containers — run an image
Remote Images
hub.docker.com
No images pushed yet — run docker push
Commands that cross the boundary
docker pushLocal image → Registrydocker pullRegistry → Local imagedocker runAuto-pulls if not found locally0
Running
0
Stopped
0
Images
Write a Dockerfile to get started.
docker versionBasicsShow Docker client and server version info.
docker infoBasicsDisplay system-wide Docker information.
docker helpBasicsList all available Docker commands.
docker pull <image>ImagesDownload an image from Docker Hub to your machine.
docker build -t <tag> .ImagesBuild an image from the Dockerfile in the current directory.
docker imagesImagesList all locally available images.
docker rmi <image>ImagesRemove a local image by name or ID.
docker image pruneImagesRemove all dangling (untagged) images.
docker run <image>ContainersCreate and start a container from an image.
docker run -d <image>ContainersRun a container in detached (background) mode.
docker run -p 3000:3000ContainersMap host port 3000 → container port 3000.
docker run -v ./data:/dataContainersMount a host directory as a volume inside the container.
docker psContainersList all currently running containers.
docker ps -aContainersList ALL containers including stopped ones.
docker stop <id>ContainersGracefully stop a running container (SIGTERM).
docker rm <id>ContainersRemove a stopped container permanently.
docker exec -it <id> shContainersOpen an interactive shell inside a running container.
docker logs <id>ContainersView stdout / stderr output of a container.
docker inspect <id>ContainersReturn detailed JSON info about a container or image.
docker compose upComposeBuild and start all services in docker-compose.yml.
docker compose up -dComposeStart Compose services in detached (background) mode.
docker compose downComposeStop and remove Compose containers, networks, and volumes.
docker compose logs -fComposeStream live logs from all Compose services.
docker compose buildComposeRebuild images for all Compose services.
docker network lsNetworkList all Docker networks.
docker network createNetworkCreate a user-defined bridge network.
docker network inspectNetworkDisplay detailed info about a network.
docker loginRegistryLog in to Docker Hub or a private registry.
docker push <tag>RegistryUpload a tagged local image to a registry.
docker tag <img> <tag>RegistryCreate an alias tag for an existing image before pushing.