detached mode
Running a container in the background so your terminal is free straight away.
In more detail
docker run -d prints the container ID and returns. Read its output later with docker logs and stop it with docker stop. The opposite is foreground mode.
Examples
docker run -d ... redpanda startdocker run -d --name command-demo alpine:3.20 sleep 20Related terms
- docker run — Creates a new container from an image and starts it, in one step.
- foreground mode — Running a container with its output connected to your terminal until it exits.
- docker logs — Shows what a container main process wrote to standard output and standard error.
Taught in
- Ninety Minutes, No Question Count — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers
- Commands, Logs, Exec And Exit Codes — Docker Architecture & Production Containers
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- Authenticate, Tag, Push And Pull From A Registry — Docker Architecture & Production Containers
- Scan, Patch And Inspect The Software Supply Chain — Docker Architecture & Production Containers
- Ephemeral Filesystems And Named Volumes — Docker Architecture & Production Containers
- Bind Mounts, Permissions And Backups — Docker Architecture & Production Containers
- Bridge Networks, DNS And Container Communication — Docker Architecture & Production Containers
- Port Publishing, Localhost And Network Troubleshooting — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Development Overrides, Hot Reloading And Debuggers — Docker Architecture & Production Containers
- Integration Tests, Test Data And Compose Cleanup — Docker Architecture & Production Containers
- Diagnose Crashes, Resource Limits And Unhealthy Containers — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- Harden And Deliver The Complete Service Stack — Docker Architecture & Production Containers
- Why A Log And Not A Queue — Apache Kafka & Event Streaming