Docker Engine 29 reference · 9 entries

Docker Containers

Run, list, inspect, debug, copy files and stop containers with docker run, ps, logs, exec, cp, stats, stop and rm.

NameDescriptionSince
docker run Create and start a container from an image, with options for ports, environment, volumes, names and cleanup.
docker ps List containers: running ones by default, all with -a, filtered and formatted for scripts with --filter and --format.
docker logs Show what a container wrote to stdout and stderr, optionally only the last lines, with timestamps, or following new output.
docker exec Run an extra command inside a running container, for example a shell for debugging or a one-off task.
docker stop Stop running containers gracefully: send SIGTERM, wait for the timeout (10 s by default), then SIGKILL.
docker rm Remove one or more stopped containers and their writable layers; -f stops and removes running ones too.
docker inspect Show the low-level JSON configuration and state of containers, images, volumes or networks; extract fields with --format.
docker cp Copy files or folders between a container and the host, in either direction, even when the image has no shell.
docker stats Show live CPU, memory, network and disk I/O usage per container; use --no-stream for a single snapshot in scripts.

Was this page helpful?