2015-10-08 10:20:06 -04:00
|
|
|
<!-- [metadata]>
|
|
|
|
+++
|
2016-06-28 14:53:39 -04:00
|
|
|
title = "Docker commands"
|
2015-10-08 10:20:06 -04:00
|
|
|
description = "Docker's CLI command description and usage"
|
|
|
|
keywords = ["Docker, Docker documentation, CLI, command line"]
|
|
|
|
[menu.main]
|
2016-06-28 14:53:39 -04:00
|
|
|
identifier= "smn_cli_guide"
|
|
|
|
parent = "smn_cli"
|
2016-01-23 23:36:40 -05:00
|
|
|
weight=-70
|
2015-10-08 10:20:06 -04:00
|
|
|
+++
|
2015-11-22 20:15:39 -05:00
|
|
|
<![end-metadata]-->
|
|
|
|
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
# The Docker commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
This section contains reference information on using Docker's command line
|
|
|
|
client. Each command has a reference page along with samples. If you are
|
|
|
|
unfamiliar with the command line, you should start by reading about how to [Use
|
|
|
|
the Docker command line](cli.md).
|
2015-10-08 10:20:06 -04:00
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
You start the Docker daemon with the command line. How you start the daemon
|
|
|
|
affects your Docker containers. For that reason you should also make sure to
|
|
|
|
read the [`dockerd`](dockerd.md) reference page.
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Docker management commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [dockerd](dockerd.md) | Launch the Docker daemon |
|
|
|
|
| [info](info.md) | Display system-wide information |
|
|
|
|
| [inspect](inspect.md)| Return low-level information on a container or image |
|
|
|
|
| [version](version.md) | Show the Docker version information |
|
|
|
|
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Image commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [build](build.md) | Build an image from a Dockerfile |
|
|
|
|
| [commit](commit.md) | Create a new image from a container's changes |
|
|
|
|
| [history](history.md) | Show the history of an image |
|
|
|
|
| [images](images.md) | List images |
|
|
|
|
| [import](import.md) | Import the contents from a tarball to create a filesystem image |
|
|
|
|
| [load](load.md) | Load an image from a tar archive or STDIN |
|
|
|
|
| [rmi](rmi.md) | Remove one or more images |
|
|
|
|
| [save](save.md) | Save images to a tar archive |
|
|
|
|
| [tag](tag.md) | Tag an image into a repository |
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Container commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [attach](attach.md) | Attach to a running container |
|
|
|
|
| [cp](cp.md) | Copy files/folders from a container to a HOSTDIR or to STDOUT |
|
|
|
|
| [create](create.md) | Create a new container |
|
|
|
|
| [diff](diff.md) | Inspect changes on a container's filesystem |
|
|
|
|
| [events](events.md) | Get real time events from the server |
|
|
|
|
| [exec](exec.md) | Run a command in a running container |
|
2016-08-12 13:15:32 -04:00
|
|
|
| [export](export.md) | Export a container's filesystem as a tar archive |
|
2016-06-28 14:53:39 -04:00
|
|
|
| [kill](kill.md) | Kill a running container |
|
|
|
|
| [logs](logs.md) | Fetch the logs of a container |
|
|
|
|
| [pause](pause.md) | Pause all processes within a container |
|
|
|
|
| [port](port.md) | List port mappings or a specific mapping for the container |
|
|
|
|
| [ps](ps.md) | List containers |
|
|
|
|
| [rename](rename.md) | Rename a container |
|
|
|
|
| [restart](restart.md) | Restart a running container |
|
|
|
|
| [rm](rm.md) | Remove one or more containers |
|
|
|
|
| [run](run.md) | Run a command in a new container |
|
|
|
|
| [start](start.md) | Start one or more stopped containers |
|
|
|
|
| [stats](stats.md) | Display a live stream of container(s) resource usage statistics |
|
|
|
|
| [stop](stop.md) | Stop a running container |
|
|
|
|
| [top](top.md) | Display the running processes of a container |
|
|
|
|
| [unpause](unpause.md) | Unpause all processes within a container |
|
|
|
|
| [update](update.md) | Update configuration of one or more containers |
|
|
|
|
| [wait](wait.md) | Block until a container stops, then print its exit code |
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Hub and registry commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [login](login.md) | Register or log in to a Docker registry |
|
|
|
|
| [logout](logout.md) | Log out from a Docker registry |
|
|
|
|
| [pull](pull.md) | Pull an image or a repository from a Docker registry |
|
|
|
|
| [push](push.md) | Push an image or a repository to a Docker registry |
|
|
|
|
| [search](search.md) | Search the Docker Hub for images |
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Network and connectivity commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [network connect](network_connect.md) | Connect a container to a network |
|
|
|
|
| [network create](network_create.md) | Create a new network |
|
|
|
|
| [network disconnect](network_disconnect.md) | Disconnect a container from a network |
|
|
|
|
| [network inspect](network_inspect.md) | Display information about a network |
|
|
|
|
| [network ls](network_ls.md) | Lists all the networks the Engine `daemon` knows about |
|
|
|
|
| [network rm](network_rm.md) | Removes one or more networks |
|
|
|
|
|
2015-10-08 10:20:06 -04:00
|
|
|
|
|
|
|
### Shared data volume commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
|
|
|
|
| [volume inspect](volume_inspect.md) | Display information about a volume |
|
|
|
|
| [volume ls](volume_ls.md) | Lists all the volumes Docker knows about |
|
|
|
|
| [volume rm](volume_rm.md) | Remove one or more volumes |
|
|
|
|
|
2016-06-13 22:57:19 -04:00
|
|
|
|
|
|
|
### Swarm node commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [node promote](node_promote.md) | Promote a node that is pending a promotion to manager |
|
|
|
|
| [node demote](node_demote.md) | Demotes an existing manager so that it is no longer a manager |
|
|
|
|
| [node inspect](node_inspect.md) | Inspect a node in the swarm |
|
|
|
|
| [node update](node_update.md) | Update attributes for a node |
|
2016-07-19 17:01:31 -04:00
|
|
|
| [node ps](node_ps.md) | List tasks running on a node |
|
2016-06-28 14:53:39 -04:00
|
|
|
| [node ls](node_ls.md) | List nodes in the swarm |
|
2016-07-29 13:41:52 -04:00
|
|
|
| [node rm](node_rm.md) | Remove one or more nodes from the swarm |
|
2016-06-13 22:57:19 -04:00
|
|
|
|
|
|
|
### Swarm swarm commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
2016-07-20 14:15:08 -04:00
|
|
|
| [swarm init](swarm_init.md) | Initialize a swarm |
|
|
|
|
| [swarm join](swarm_join.md) | Join a swarm as a manager node or worker node |
|
2016-06-28 14:53:39 -04:00
|
|
|
| [swarm leave](swarm_leave.md) | Remove the current node from the swarm |
|
|
|
|
| [swarm update](swarm_update.md) | Update attributes of a swarm |
|
2016-07-20 14:15:08 -04:00
|
|
|
| [swarm join-token](swarm_join_token.md) | Display or rotate join tokens |
|
2016-06-13 22:57:19 -04:00
|
|
|
|
2016-06-17 19:51:17 -04:00
|
|
|
### Swarm service commands
|
|
|
|
|
2016-06-28 14:53:39 -04:00
|
|
|
| Command | Description |
|
|
|
|
|:--------|:-------------------------------------------------------------------|
|
|
|
|
| [service create](service_create.md) | Create a new service |
|
|
|
|
| [service inspect](service_inspect.md) | Inspect a service |
|
|
|
|
| [service ls](service_ls.md) | List services in the swarm |
|
|
|
|
| [service rm](service_rm.md) | Reemove a swervice from the swarm |
|
|
|
|
| [service scale](service_scale.md) | Set the number of replicas for the desired state of the service |
|
2016-07-19 17:01:31 -04:00
|
|
|
| [service ps](service_ps.md) | List the tasks of a service |
|
2016-06-28 14:53:39 -04:00
|
|
|
| [service update](service_update.md) | Update the attributes of a service |
|