Docker run
docker run is a Docker command that creates and starts a container from an image, with optional runtime configuration.
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
docker run is a Docker command that creates and starts a container from a specified image.
- How it is used
- Uses docker run to test microservices locally before and after publishing their images.
- How deep it goes
- Explains run options, container inspection, and cleanup for verifying a registry pull.
- Examples
- Runs a video-streaming microservice from a local image and an Azure registry image.
- What you can do after
- Operate a container with docker run, inspect its logs, and verify a published image can be pulled and started.
Road to Kubernetes
docker run is a Docker command that creates and starts a container from a specified container image.
- How it is used
- Runs container images locally or on a provisioned virtual machine as a practical deployment step.
- How deep it goes
- Covers image pulling, port publishing, interactive shells, detached execution, environment variables, inspection, logs, and stopping.
- Examples
- Uses NGINX, Postgres, custom NGINX, Python, and Node.js images with mapped ports, shells, names, and environment variables.
- What you can do after
- Operate containers by pulling, launching, exposing, inspecting, entering, logging, stopping, and configuring them with command-line flags.
Learn Docker in a Month of Lunches, Second Edition
docker run is a Docker CLI command that creates and starts a container from an image.
- How it is used
- Runs packaged tools and scripts or opens an interactive terminal inside a container.
- How deep it goes
- Explains image pulling, interactive flags, terminal access, and basic verification without detailing Docker internals.
- Examples
- Uses diamol/base:2e with hostname, date, docker container ls, and docker container logs.
- What you can do after
- Apply it via the Docker CLI to start an interactive container and inspect its running environment.
Read how Learn Docker in a Month of Lunches, Second Edition explains docker run →
Data Pipelines with Apache Airflow, Second Edition
docker run is a Docker CLI command that creates and starts a container from an image.
- How it is used
- Runs containerized data tasks and supplies task arguments, mounted storage, and cleanup behavior.
- How deep it goes
- Explains image execution, argument passing, volume mounts, and container cleanup without detailing Docker internals.
- Examples
- Uses weather output persistence and MovieLens ratings CLI help as concrete execution examples.
- What you can do after
- Operate/configure Docker containers for task execution, file persistence, testing, and cleanup.
Read how Data Pipelines with Apache Airflow, Second Edition explains docker run →
Also covered in
- Build Applications with Local AI Models on a Mac
- Kubernetes for Developers
- Build and Orchestrator in Go (From Scratch)
- AI-Powered Developer: Build software with ChatGPT and Copilot
What to know first
- containerA software container is an isolated execution environment that packages an application and its dependencies, typically sharing the host operating-system kernel.
- shell scriptA shell script is a text program containing commands interpreted and executed by a command-line shell.
- current working directoryA current working directory is the filesystem directory a process uses as the default reference point for resolving relative paths and performing file operations.
- JSONJSON is a language-independent text-based data-interchange format that represents structured values using objects, arrays, strings, numbers, booleans, and null.
Related concepts
- cd commandincludes · The cd command changes a command-line shell’s current working directory.
- lsincludes · ls is a command-line utility that lists files and directories in a filesystem directory.
- pwdincludes · pwd is a command-line utility that prints the path of the current working directory.
- container imageuses · A container image is a packaged filesystem and metadata artifact from which a container can be created and run.
Questions about docker run
What is docker run?
docker run is a Docker command that creates and starts a container from an image, with optional runtime configuration.
Which Manning books explain docker run?
Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform, Road to Kubernetes, Learn Docker in a Month of Lunches, Second Edition and Data Pipelines with Apache Airflow, Second Edition.
What should I know before learning docker run?
Manning books that teach docker run usually introduce container, shell script, current working directory and JSON first.
What kinds of docker run are there?
Kinds of docker run include cd command, ls, mkdir and pwd.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



