...

Text file src/github.com/docker/cli/docs/reference/commandline/index.md

Documentation: github.com/docker/cli/docs/reference/commandline

     1---
     2title: "Docker commands"
     3description: "Docker's CLI command description and usage"
     4keywords: "Docker, Docker documentation, CLI, command line"
     5identifier: "smn_cli_guide"
     6---
     7
     8# The Docker commands
     9
    10This section contains reference information on using Docker's command line
    11client. Each command has a reference page along with samples. If you are
    12unfamiliar with the command line, you should start by reading about how to [Use
    13the Docker command line](https://docs.docker.com/engine/reference/commandline/cli/).
    14
    15You start the Docker daemon with the command line. How you start the daemon
    16affects your Docker containers. For that reason you should also make sure to
    17read the [`dockerd`](https://docs.docker.com/reference/cli/dockerd/) reference page.
    18
    19## Commands by object
    20
    21### Docker management commands
    22
    23| Command                           | Description                                          |
    24| :-------------------------------- | :--------------------------------------------------- |
    25| [dockerd](../dockerd.md)          | Launch the Docker daemon                             |
    26| [inspect](inspect.md)             | Return low-level information on a container or image |
    27| [system events](system_events.md) | Get real-time events from the server                 |
    28| [system info](system_info.md)     | Display system-wide information                      |
    29| [version](version.md)             | Show the Docker version information                  |
    30
    31### Image commands
    32
    33| Command                           | Description                                                     |
    34| :-------------------------------- | :-------------------------------------------------------------- |
    35| [image build](image_build.md)     | Build an image from a Dockerfile                                |
    36| [image commit](image_commit.md)   | Create a new image from a container's changes                   |
    37| [image history](image_history.md) | Show the history of an image                                    |
    38| [image import](image_import.md)   | Import the contents from a tarball to create a filesystem image |
    39| [image load](image_load.md)       | Load an image from a tar archive or STDIN                       |
    40| [image ls](image_ls.md)           | List images                                                     |
    41| [image prune](image_prune.md)     | Remove unused images                                            |
    42| [image rm](image_rm.md)           | Remove one or more images                                       |
    43| [image save](image_save.md)       | Save images to a tar archive                                    |
    44| [image tag](image_tag.md)         | Tag an image into a repository                                  |
    45
    46### Container commands
    47
    48| Command                                   | Description                                                     |
    49| :---------------------------------------- | :-------------------------------------------------------------- |
    50| [container attach](container_attach.md)   | Attach to a running container                                   |
    51| [container cp](container_cp.md)           | Copy files/folders from a container to a HOSTDIR or to STDOUT   |
    52| [container create](container_create.md)   | Create a new container                                          |
    53| [container diff](container_diff.md)       | Inspect changes on a container's filesystem                     |
    54| [container exec](container_exec.md)       | Execute a command in a running container                        |
    55| [container export](container_export.md)   | Export a container's filesystem as a tar archive                |
    56| [container kill](container_kill.md)       | Kill a running container                                        |
    57| [container logs](container_logs.md)       | Fetch the logs of a container                                   |
    58| [container ls](container_ls.md)           | List containers                                                 |
    59| [container pause](container_pause.md)     | Pause all processes within a container                          |
    60| [container port](container_port.md)       | List port mappings or a specific mapping for the container      |
    61| [container prune](container_prune.md)     | Remove all stopped containers                                   |
    62| [container rename](container_rename.md)   | Rename a container                                              |
    63| [container restart](container_restart.md) | Restart a running container                                     |
    64| [container rm](container_rm.md)           | Remove one or more containers                                   |
    65| [container run](container_run.md)         | Create and run a new container from an image                    |
    66| [container start](container_start.md)     | Start one or more stopped containers                            |
    67| [container stats](container_stats.md)     | Display a live stream of container(s) resource usage statistics |
    68| [container stop](container_stop.md)       | Stop a running container                                        |
    69| [container top](container_top.md)         | Display the running processes of a container                    |
    70| [container unpause](container_unpause.md) | Unpause all processes within a container                        |
    71| [container update](container_update.md)   | Update configuration of one or more containers                  |
    72| [container wait](container_wait.md)       | Block until a container stops, then print its exit code         |
    73
    74### Hub and registry commands
    75
    76| Command             | Description                       |
    77| :------------------ | :-------------------------------- |
    78| [login](login.md)   | Log in to a registry              |
    79| [logout](logout.md) | Log out from a registry           |
    80| [pull](pull.md)     | Download an image from a registry |
    81| [push](push.md)     | Upload an image to a registry     |
    82| [search](search.md) | Search Docker Hub for images      |
    83
    84### Network and connectivity commands
    85
    86| Command                                     | Description                                            |
    87| :------------------------------------------ | :----------------------------------------------------- |
    88| [network connect](network_connect.md)       | Connect a container to a network                       |
    89| [network create](network_create.md)         | Create a new network                                   |
    90| [network disconnect](network_disconnect.md) | Disconnect a container from a network                  |
    91| [network inspect](network_inspect.md)       | Display information about a network                    |
    92| [network ls](network_ls.md)                 | Lists all the networks the Engine `daemon` knows about |
    93| [network prune](network_prune.md)           | Remove all unused networks                             |
    94| [network rm](network_rm.md)                 | Removes one or more networks                           |
    95
    96### Shared data volume commands
    97
    98| Command                             | Description                                                      |
    99| :---------------------------------- | :--------------------------------------------------------------- |
   100| [volume create](volume_create.md)   | Creates a new volume where containers can consume and store data |
   101| [volume inspect](volume_inspect.md) | Display information about a volume                               |
   102| [volume ls](volume_ls.md)           | Lists all the volumes Docker knows about                         |
   103| [volume prune](volume_prune.md)     | Remove unused local volumes                                      |
   104| [volume rm](volume_rm.md)           | Remove one or more volumes                                       |
   105
   106### Swarm node commands
   107
   108| Command                         | Description                                                   |
   109| :------------------------------ | :------------------------------------------------------------ |
   110| [node demote](node_demote.md)   | Demotes an existing manager so that it is no longer a manager |
   111| [node inspect](node_inspect.md) | Inspect a node in the swarm                                   |
   112| [node ls](node_ls.md)           | List nodes in the swarm                                       |
   113| [node promote](node_promote.md) | Promote a node that is pending a promotion to manager         |
   114| [node ps](node_ps.md)           | List tasks running on one or more nodes                       |
   115| [node rm](node_rm.md)           | Remove one or more nodes from the swarm                       |
   116| [node update](node_update.md)   | Update attributes for a node                                  |
   117
   118### Swarm management commands
   119
   120| Command                                 | Description                                   |
   121| :-------------------------------------- | :-------------------------------------------- |
   122| [swarm init](swarm_init.md)             | Initialize a swarm                            |
   123| [swarm join-token](swarm_join-token.md) | Display or rotate join tokens                 |
   124| [swarm join](swarm_join.md)             | Join a swarm as a manager node or worker node |
   125| [swarm leave](swarm_leave.md)           | Remove the current node from the swarm        |
   126| [swarm unlock-key](swarm_unlock-key.md) | Manage the unlock key                         |
   127| [swarm unlock](swarm_unlock.md)         | Unlock swarm                                  |
   128| [swarm update](swarm_update.md)         | Update attributes of a swarm                  |
   129
   130### Swarm service commands
   131
   132| Command                               | Description                                                     |
   133| :------------------------------------ | :-------------------------------------------------------------- |
   134| [service create](service_create.md)   | Create a new service                                            |
   135| [service inspect](service_inspect.md) | Inspect a service                                               |
   136| [service logs](service_logs.md)       | Fetch the logs of a service or task                             |
   137| [service ls](service_ls.md)           | List services in the swarm                                      |
   138| [service ps](service_ps.md)           | List the tasks of a service                                     |
   139| [service rm](service_rm.md)           | Remove a service from the swarm                                 |
   140| [service scale](service_scale.md)     | Set the number of replicas for the desired state of the service |
   141| [service update](service_update.md)   | Update the attributes of a service                              |
   142
   143### Swarm secret commands
   144
   145| Command                              | Description                                     |
   146| :----------------------------------- | :---------------------------------------------- |
   147| [secret create](secret_create.md)    | Create a secret from a file or STDIN as content |
   148| [secret inspect](service_inspect.md) | Inspect the specified secret                    |
   149| [secret ls](secret_ls.md)            | List secrets in the swarm                       |
   150| [secret rm](secret_rm.md)            | Remove the specified secrets from the swarm     |
   151
   152### Swarm stack commands
   153
   154| Command                             | Description                                             |
   155| :---------------------------------- | :------------------------------------------------------ |
   156| [stack config](stack_config.md)     | Output the Compose file after merges and interpolations |
   157| [stack deploy](stack_deploy.md)     | Deploy a new stack or update an existing stack          |
   158| [stack ls](stack_ls.md)             | List stacks in the swarm                                |
   159| [stack ps](stack_ps.md)             | List the tasks in the stack                             |
   160| [stack rm](stack_rm.md)             | Remove the stack from the swarm                         |
   161| [stack services](stack_services.md) | List the services in the stack                          |
   162
   163### Plugin commands
   164
   165| Command                             | Description                                     |
   166| :---------------------------------- | :---------------------------------------------- |
   167| [plugin create](plugin_create.md)   | Create a plugin from a rootfs and configuration |
   168| [plugin disable](plugin_disable.md) | Disable a plugin                                |
   169| [plugin enable](plugin_enable.md)   | Enable a plugin                                 |
   170| [plugin inspect](plugin_inspect.md) | Display detailed information on a plugin        |
   171| [plugin install](plugin_install.md) | Install a plugin                                |
   172| [plugin ls](plugin_ls.md)           | List plugins                                    |
   173| [plugin push](plugin_push.md)       | Push a plugin to a registry                     |
   174| [plugin rm](plugin_rm.md)           | Remove a plugin                                 |
   175| [plugin set](plugin_set.md)         | Change settings for a plugin                    |
   176
   177### Context commands
   178
   179| Command                               | Description                    |
   180| :------------------------------------ | :----------------------------- |
   181| [context create](context_create.md)   | Create a context               |
   182| [context export](context_export.md)   | Export a context               |
   183| [context import](context_import.md)   | Import a context               |
   184| [context inspect](context_inspect.md) | Inspect one or more contexts   |
   185| [context ls](context_ls.md)           | List contexts                  |
   186| [context rm](context_rm.md)           | Remove one or more contexts    |
   187| [context update](context_update.md)   | Update a context               |
   188| [context use](context_use.md)         | Set the current docker context |

View as plain text