docker
Manage Docker containers and images. Some subcommands such as `container` and `image` have their own usage documentation.
More info →Subcommands (8)
Build an image from a Dockerfile.
Run and manage multi container Docker applications.
This command is an alias of `docker container exec`.
This command is an alias of `docker container logs`.
This command is an alias of `docker container ls`.
This command is an alias of `docker image pull`.
This command is an alias of `docker container rm`.
This command is an alias of `docker container run`.
Options (10)
booleanList all Docker containers (running and stopped)
docker {{[ps|container ls]}} {{[-a|--all]}}-a, --allbooleanList all Docker containers (running and stopped)
docker {{[ps|container ls]}} {{[-a|--all]}}booleanStart a container from an image, with a custom name
docker {{[run|container run]}} --name {{container_name}} {{image}}booleanPull an image from a Docker registry
docker {{[pull|image pull]}} {{image}}booleanDisplay the list of already downloaded images
docker {{[images|image ls]}}booleanOpen an interactive tty with Bourne shell (`sh`) inside a running container
docker {{[exec|container exec]}} {{[-it|--interactive --tty]}} {{container_name}} {{sh}}booleanOpen an interactive tty with Bourne shell (`sh`) inside a running container
docker {{[exec|container exec]}} {{[-it|--interactive --tty]}} {{container_name}} {{sh}}booleanRemove stopped containers
docker {{[rm|container rm]}} {{container1 container2 ...}}booleanFetch and follow the logs of a container
docker {{[logs|container logs]}} {{[-f|--follow]}} {{container_name}}-f, --followbooleanFetch and follow the logs of a container
docker {{[logs|container logs]}} {{[-f|--follow]}} {{container_name}}Examples (8)
List all Docker containers (running and stopped)
docker [ps|container ls] [-a|--all]Start a container from an image, with a custom name
docker [run|container run] --name container_name imageStart or stop an existing container
docker container start|stop container_namePull an image from a Docker registry
docker [pull|image pull] imageDisplay the list of already downloaded images
docker [images|image ls]Open an interactive tty with Bourne shell (`sh`) inside a running container
docker [exec|container exec] [-it|--interactive --tty] container_name shRemove stopped containers
docker [rm|container rm] container1 container2 ...Fetch and follow the logs of a container
docker [logs|container logs] [-f|--follow] container_name