🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)
🔧 AI Nachrichten Major AI platforms go down in unprecedented simultaneous outage(03.09.2026 um 17:34 Uhr)
🔧 AI Nachrichten ChatGPT, Claude, and Grok Down? Users Report Widespread Outages(03.09.2026 um 19:14 Uhr)
🔧 AI Nachrichten OpenAI Launches GPT-6 Astra, Says We May Have Entered the AGI Era(03.09.2026 um 22:08 Uhr)
🔧 AI Nachrichten Claude Comes to CarPlay as Fifth Major AI Chatbot App(05.09.2026 um 05:31 Uhr)
🔧 AI Nachrichten OpenAI’s GPT-6 Astra Is AGI, Says NVIDIA CEO Jensen Huang(07.09.2026 um 06:31 Uhr)
🔧 AI Nachrichten Blame AI companies for Mac mini and Mac Studio shortage(31.08.2026 um 10:32 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

10 Docker Commands Every Developer Should Know in 2026

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Docker has been around for a decade, yet most developers still use the same 3 commands. Here are 10 commands that will make you faster, fix production issues quicker, and actually understand what's happening inside your containers.






1. docker exec -it — Your Debug Entry Point



The classic. But most people don't use it right. Always specify the shell explicitly:




CODE
docker exec -it my-container /bin/bash
# Alpine containers don't have bash:
docker exec -it my-container /bin/sh




Bonus: pipe commands directly without entering the container:




CODE
docker exec my-container cat /etc/nginx/nginx.conf






2. docker logs — Read the Room



Don't SSH into a container to read logs. Use the tools built for it:



CODE
docker logs --tail 100 -f my-container   # last 100 lines, follow
docker logs --since 10m my-container # last 10 minutes
docker logs --timestamps my-container # show when each line happened






3. docker system df — Where Did My Disk Go?



This single command tells you exactly how much space Docker is eating:



CODE
docker system df
# TYPE TOTAL ACTIVE SIZE RECLAIMABLE
# Images 12 5 2.3GB 1.1GB (47%)
# Containers 8 3 150MB 90MB (60%)
# Volumes 4 2 500MB 200MB (40%)




Follow up with docker system prune -a when you need to clean house. The -a flag also removes unused images, not just dangling ones.






4. docker inspect — The Truth Is in the JSON



Every Docker object has a complete JSON manifest. inspect reveals it. Use Go templates to extract exactly what you need:




CODE
docker inspect -f '{{.NetworkSettings.IPAddress}}' my-container
docker inspect -f '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{println}}{{end}}' my-container
docker inspect -f '{{.State.StartedAt}}' my-container






5. docker stats — Real-Time Resource Monitor



Like top but for containers. Shows CPU, memory, network, and disk I/O — live:



CODE
docker stats --no-stream          # snapshot
docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"




If a container is using 2GB of RAM but your app only needs 200MB, you'll spot it here.






6. docker history — What's Actually In That Image?



Before pulling a 1.5GB image from Docker Hub, check what's inside:




CODE
docker history node:20-alpine
# IMAGE CREATED SIZE COMMENT
# abc123 2 days ago 5.6MB /bin/sh -c apk add --no-cache ...
# def456 2 days ago 112MB /bin/sh -c mkdir /app




This shows every layer and its size. You'll often find 500MB of build dependencies that should've been cleaned up in the Dockerfile.






7. docker cp — Move Files In and Out



No need to mount volumes for one-off file transfers:




CODE
docker cp ./config.json my-container:/app/config.json     # host → container
docker cp my-container:/var/log/app.log ./app.log # container → host






8. docker commit — Snapshot a Running Container



Made changes inside a container and want to save them as an image? Don't rebuild — snapshot it:



CODE
docker commit my-container my-debug-image:v1




Useful for debugging, but don't build production images this way. It captures everything including temp files and secrets.






9. docker network — See Who's Talking to Whom




CODE
docker network ls                          # list all networks
docker network inspect bridge # see connected containers
docker network create --driver bridge my-net # custom network




Containers on the same custom network can resolve each other by name. No more hardcoding IPs.






10. docker events — Watch Everything Happen



Real-time stream of every Docker event — container starts, stops, health checks, image pulls:




CODE
docker events --since 5m
docker events --filter 'event=die' --filter 'container=my-app'




Pipe this into your monitoring stack. When a container unexpectedly dies at 3 AM, you'll know exactly when.






Bottom Line



You don't need to memorize all 10. Start with inspect and system df — you'll use them weekly. Add logs --since for production debugging and events for monitoring. The rest will become muscle memory over time.



The gap between "I use Docker" and "I understand Docker" is exactly these 10 commands.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
3 Quellen
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
1 Quelle
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
1 Quelle
Major AI platforms go down in unprecedented simultaneous outage
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten 10 Docker Commands Every Developer Should Know in 2026

Thematisch verwandte Begriffe: Docker, Commands, Every, Developer · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...