docker run — Basic UsageIT technician command center
Containers · Docker and Kubernetes

docker run — Basic Usage

Use docker run for a standard administrative task.

Copy-ready commanddocker run — Basic Usage
docker run -d --name web01 -p 8080:80 nginx:latest

Requirements and permissions

Requirements
Docker Engine, Docker Compose, or kubectl
Permissions
Container or cluster permissions vary
Last reviewed
2026-07-31

Examples

Basic Usage

Use docker run for a standard administrative task.

docker run -d --name web01 -p 8080:80 nginx:latest

Original command

Create and run a container.

docker run -d --name web01 -p 8080:80 nginx:latest

Common errors

Command not found

Confirm Docker Engine, Docker Compose, or kubectl is installed and available in your current shell.