commands.sh

docker

all

Manage Docker containers and images. Some subcommands such as `container` and `image` have their own usage documentation.

More info →

Subcommands (36)

docker build

Build an image from a Dockerfile.

→
docker commit

This command is an alias of `docker container commit`.

→
docker compose

Run and manage multi container Docker applications.

→
docker container

Manage Docker containers.

→
docker context

Switch between contexts to manage multiple Docker environments.

→
docker cp

This command is an alias of `docker container cp`.

→
docker diff

This command is an alias of `docker container diff`.

→
docker exec

This command is an alias of `docker container exec`.

→
docker image

Manage Docker images. See also: `docker build`, `docker image pull`, `docker image rm`.

→
docker images

This command is an alias of `docker image ls`.

→
docker inspect

Return low-level information on Docker objects.

→
docker load

This command is an alias of `docker image load`.

→
docker login

Log into a Docker registry.

→
docker logs

This command is an alias of `docker container logs`.

→
docker-machine

Create and manage machines running Docker.

→
docker network

Create and manage Docker networks.

→
docker node

Manage Docker Swarm nodes.

→
docker ps

This command is an alias of `docker container ls`.

→
docker pull

This command is an alias of `docker image pull`.

→
docker rename

This command is an alias of `docker container rename`.

→
docker rm

This command is an alias of `docker container rm`.

→
docker rmi

This command is an alias of `docker image rm`.

→
docker run

This command is an alias of `docker container run`.

→
docker save

This command is an alias of `docker image save`.

→
docker search

Search for Docker images on Docker Hub.

→
docker secret

Manage Docker swarm secrets.

→
docker service

Manage the services on a Docker daemon.

→
docker-slim

This command is an alias of `slim`.

→
docker start

This command is an alias of `docker container start`.

→
docker stats

This command is an alias of `docker container stats`.

→
docker swarm

A container orchestration tool.

→
docker system

Manage Docker data and display system-wide information.

→
docker tag

This command is an alias of `docker image tag`.

→
docker top

This command is an alias of `docker container top`.

→
docker update

This command is an alias of `docker container update`.

→
docker volume

Manage Docker volumes.

→

Options (10)

boolean

List all Docker containers (running and stopped)

Example: docker {{[ps|container ls]}} {{[-a|--all]}}
-a, --allboolean

List all Docker containers (running and stopped)

Example: docker {{[ps|container ls]}} {{[-a|--all]}}
boolean

Start a container from an image, with a custom name

Example: docker {{[run|container run]}} --name {{container_name}} {{image}}
boolean

Pull an image from a Docker registry

Example: docker {{[pull|image pull]}} {{image}}
boolean

Display the list of already downloaded images

Example: docker {{[images|image ls]}}
boolean

Open an interactive tty with Bourne shell (`sh`) inside a running container

Example: docker {{[exec|container exec]}} {{[-it|--interactive --tty]}} {{container_name}} {{sh}}
boolean

Open an interactive tty with Bourne shell (`sh`) inside a running container

Example: docker {{[exec|container exec]}} {{[-it|--interactive --tty]}} {{container_name}} {{sh}}
boolean

Remove stopped containers

Example: docker {{[rm|container rm]}} {{container1 container2 ...}}
boolean

Fetch and follow the logs of a container

Example: docker {{[logs|container logs]}} {{[-f|--follow]}} {{container_name}}
-f, --followboolean

Fetch and follow the logs of a container

Example: 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 image

Start or stop an existing container

docker container start|stop container_name

Pull an image from a Docker registry

docker [pull|image pull] image

Display 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 sh

Remove stopped containers

docker [rm|container rm] container1 container2 ...

Fetch and follow the logs of a container

docker [logs|container logs] [-f|--follow] container_name
made by @shridhargupta | data from tldr-pages