docker-container
Manage (create, start, stop) Docker containers
TLDR
List currently running Docker containers
Start one or more stopped containers
Kill one or more running containers
Stop one or more running containers
Pause all processes within one or more containers
Display detailed information on one or more containers
Export a container's filesystem as a .tar archive
Create a new image from a container's changes
SYNOPSIS
docker container COMMAND [OPTIONS] [ARG...]
PARAMETERS
--config
Location of client config files
--context
Name of context to connect to daemon
--debug
Enable debug mode
--help
Print usage information
--log-level
Set logging level (debug|info|warn|error|fatal)
--version
Print version information
DESCRIPTION
The docker container command is a key component of the Docker CLI, providing a unified interface to manage containers—lightweight, portable, executable packages that encapsulate applications and their dependencies. This subcommand group enables users to create, run, monitor, and delete containers efficiently, supporting modern DevOps workflows, microservices, and cloud-native deployments.
Docker containers use OS-level virtualization for superior efficiency over traditional VMs, sharing the host kernel while isolating processes. Common tasks include launching interactive shells (docker container run -it), listing active containers (docker container ls), viewing logs (docker container logs), and resource stats (docker container stats). It integrates seamlessly with Docker images, networks, and volumes.
Ideal for developers testing locally, sysadmins scaling production, or teams using CI/CD pipelines, it abstracts complex virtualization into simple commands. Requires a running Docker daemon and often elevated privileges. Enhances reproducibility across environments from laptops to clusters.
CAVEATS
Requires Docker daemon; root or docker group access often needed. Subcommands have additional options—use docker container COMMAND --help for details. Not all subcommands support all global flags.
KEY SUBCOMMANDS
attach, commit, cp, create, exec, inspect, kill, logs, ls, pause, prune, rm, run, start, stats, stop, top, unpause, update, wait.
Use docker container --help for full list.
EXIT CODES
0: Success
1: Generic error
125: Requested subcommand unavailable
126: Subcommand invoked with invalid args
127: Subcommand not found/invalid.
HISTORY
Restructured into subcommand groups like docker container in Docker 1.13 (March 2017, API 1.25) for better organization. Evolved from original flat CLI; Docker originated 2013 by dotCloud, now maintained by Docker Inc. and Moby project.
SEE ALSO
docker(1), podman-container(1), docker-run(1), docker-image(1)


