the IT Hustle
WerkzeugePraxishandbuchÜber uns
FundamentalsKI-unterstützt2026-04-02•10 min Lesezeit

Docker in 10 Minutes: The Only Commands You Actually Need

Von Salty Deprecated Software Engineer

✨ KI-unterstützter Inhalt

Dieser Artikel wurde mit KI-Unterstützung erstellt und von unserem Team auf Richtigkeit und Qualität geprüft. Alle technischen Informationen und Beispiele wurden verifiziert.

Docker has a reputation for being complicated. It's not. The problem is that every tutorial starts with "Docker uses cgroups and namespaces to isolate processes in the Linux kernel" — and you close the tab before you learn anything useful.

Here's the truth: you need about 12 commands to use Docker for 95% of real work. The rest is edge cases and ops stuff you can Google when you need it.

This guide assumes you've installed Docker (docs.docker.com/get-docker) and have a terminal open. Let's go.

The Mental Model (30 Seconds)

Image = a blueprint (like a recipe)

Container = a running instance of that blueprint (like the cooked meal)

Docker Hub = a library of blueprints other people made (like a cookbook)

That's it. Everything else is details.

The 12 Commands You Need

1. docker pull — Download an Image

docker pull node:22

# Downloads the Node.js 22 image from Docker Hub

Like npm install but for entire environments.

2. docker run — Start a Container

docker run -it node:22 bash

# Starts a Node.js container and drops you into a shell

# -i = interactive, -t = terminal

3. docker run -d — Run in Background

docker run -d -p 3000:3000 --name myapp node:22

# -d = detached (runs in background)

# -p 3000:3000 = map port 3000 on your machine to 3000 in the container

# --name myapp = give it a name you can remember

4. docker ps — See What's Running

docker ps

# Shows all running containers

docker ps -a

# Shows ALL containers (including stopped)

5. docker stop / docker start — Control Containers

docker stop myapp

docker start myapp

6. docker logs — See What Happened

docker logs myapp

# Shows stdout/stderr from the container

docker logs -f myapp

# -f = follow (like tail -f)

7. docker exec — Run Commands Inside a Container

docker exec -it myapp bash

# Opens a shell inside a running container

# Great for debugging

8. docker build — Create Your Own Image

docker build -t my-app:v1 .

# -t = tag (name:version)

# . = use the Dockerfile in current directory

9. docker images — List Your Images

docker images

# Lists all images on your machine

10. docker rm / docker rmi — Clean Up

docker rm myapp

# Remove a stopped container

docker rmi node:22

# Remove an image

docker system prune

# Nuclear option: remove all unused containers, images, networks

11. docker-compose up — Multi-Container Apps

docker compose up -d

# Starts all services defined in docker-compose.yml

docker compose down

# Stops and removes everything

This is how you run a full stack locally — database, backend, frontend — with one command.

12. docker volume — Persist Your Data

docker run -v mydata:/app/data my-app

# -v = mount a volume so data survives container restarts

A Real-World Example: Postgres in 30 Seconds

# Start a Postgres database with one command:

docker run -d \

--name my-postgres \

-e POSTGRES_PASSWORD=secret \

-p 5432:5432 \

-v pgdata:/var/lib/postgresql/data \

postgres:16

# That's it. Connect at localhost:5432.

# Data persists because of the -v volume mount.

The Cheat Sheet

What You WantCommand
Download an imagedocker pull name:tag
Run interactivelydocker run -it name bash
Run in backgrounddocker run -d -p 3000:3000 name
See running containersdocker ps
Stop a containerdocker stop name
View logsdocker logs -f name
Shell into containerdocker exec -it name bash
Build your imagedocker build -t name:tag .
Clean everythingdocker system prune
Multi-container stackdocker compose up -d

The Bottom Line

Docker isn't hard — it's just poorly explained. The mental model is simple: images are blueprints, containers are running instances. 12 commands cover 95% of daily use. Everything else you learn as you need it.

Start with docker run -it node:22 bash. You'll be inside a Node.js environment in 10 seconds. From there, you're a Docker user.

New to the command line? Read our 10 Command Line Tools That Will 10x Your Productivity and learn Unix File Permissions Explained for Humans.

IT
Salty Deprecated Software Engineer

Geschrieben unter dem redaktionellen Pseudonym von The IT Hustle — über 25 Jahre als Laptop-Techniker, Systemadministrator, Storage-Ingenieur und Softwareentwickler, heute im Betrieb von KI-Agenten. Jeder Beitrag wird vor der Veröffentlichung von einem Menschen geprüft; Details in den Redaktionsrichtlinien.

Unsere ToolsAlle ArtikelÜber uns

Immer auf dem Laufenden

Als Erster über neue Tools, Blogbeiträge und Updates informiert sein. Kein Spam.

Eigene Anti-Halluzinations-Prompts generieren

Unsere AI Prompt Engine nutzt proprietäre Technologie, um Prompts mit integrierter Verifikation und Widerspruchstests zu generieren.

3 kostenlose Generierungen testen →

Unternehmen

  • Über uns
  • Praxishandbuch
  • KI-Glossar
  • Der Autor
  • Kontakt

Produkt

  • Werkzeuge
  • Preis-Radar
  • Agent Ops
  • Programmierung
  • Gestaltung
  • Administration
  • Produktivität
  • Marketing
  • Geschäft

Rechtliches

  • Datenschutzerklärung
  • Nutzungsbedingungen
  • Haftungsausschluss
  • Redaktionsrichtlinien
  • Korrekturen

© 2026 Salty Rantz LLC. Alle Rechte vorbehalten.

Für Arbeitnehmer im technologischen Umbruch.