Docker Demystified: The Only Cheat Sheet You Need
Docker is one of those tools that's simple in concept and maddeningly complex in practice. You understand containers, you've pulled an image, and then suddenly you're debugging a networking issue b...

Source: DEV Community
Docker is one of those tools that's simple in concept and maddeningly complex in practice. You understand containers, you've pulled an image, and then suddenly you're debugging a networking issue between three services at 11pm and you can't remember if it's docker compose down -v or docker compose down --volumes. This cheat sheet is my antidote to that. Pin it, bookmark it, and stop wasting time on Docker documentation. Container Lifecycle # Create & Start docker run <image> # Pull + create + start docker run -it <image> bash # Interactive with TTY docker run -d <image> # Detached (background) docker run --name myapp <image> # Named container docker run --rm <image> # Auto-remove on exit docker run -p 8080:80 <image> # Map host:container port docker run -e ENV_VAR=value <image> # Set environment variable docker run --env-file .env <image> # Load env from file docker r