mirror of https://github.com/docker/cli.git
add menu.md, make index.md command line reference, update typos/minor errors in cli docs
Signed-off-by: Charles Smith <charles.smith@docker.com>
This commit is contained in:
parent
b9505045d9
commit
a3b4cd7d99
|
@ -1,11 +1,11 @@
|
||||||
<!-- [metadata]>
|
<!-- [metadata]>
|
||||||
+++
|
+++
|
||||||
title = "Command line reference"
|
title = "Docker commands"
|
||||||
description = "Docker's CLI command description and usage"
|
description = "Docker's CLI command description and usage"
|
||||||
keywords = ["Docker, Docker documentation, CLI, command line"]
|
keywords = ["Docker, Docker documentation, CLI, command line"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
identifier= "smn_cli"
|
identifier= "smn_cli_guide"
|
||||||
parent = "engine_ref"
|
parent = "smn_cli"
|
||||||
weight=-70
|
weight=-70
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
@ -14,103 +14,129 @@ weight=-70
|
||||||
|
|
||||||
# The Docker commands
|
# The Docker commands
|
||||||
|
|
||||||
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).
|
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).
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
### Docker management commands
|
### Docker management commands
|
||||||
|
|
||||||
* [dockerd](dockerd.md)
|
| Command | Description |
|
||||||
* [info](info.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [inspect](inspect.md)
|
| [dockerd](dockerd.md) | Launch the Docker daemon |
|
||||||
* [version](version.md)
|
| [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 |
|
||||||
|
|
||||||
|
|
||||||
### Image commands
|
### Image commands
|
||||||
|
|
||||||
* [build](build.md)
|
| Command | Description |
|
||||||
* [commit](commit.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [export](export.md)
|
| [build](build.md) | Build an image from a Dockerfile |
|
||||||
* [history](history.md)
|
| [commit](commit.md) | Create a new image from a container's changes |
|
||||||
* [images](images.md)
|
| [export](export.md) | Export a container's filesystem as a tar archive |
|
||||||
* [import](import.md)
|
| [history](history.md) | Show the history of an image |
|
||||||
* [load](load.md)
|
| [images](images.md) | List images |
|
||||||
* [rmi](rmi.md)
|
| [import](import.md) | Import the contents from a tarball to create a filesystem image |
|
||||||
* [save](save.md)
|
| [load](load.md) | Load an image from a tar archive or STDIN |
|
||||||
* [tag](tag.md)
|
| [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 |
|
||||||
|
|
||||||
### Container commands
|
### Container commands
|
||||||
|
|
||||||
* [attach](attach.md)
|
| Command | Description |
|
||||||
* [cp](cp.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [create](create.md)
|
| [attach](attach.md) | Attach to a running container |
|
||||||
* [diff](diff.md)
|
| [cp](cp.md) | Copy files/folders from a container to a HOSTDIR or to STDOUT |
|
||||||
* [events](events.md)
|
| [create](create.md) | Create a new container |
|
||||||
* [exec](exec.md)
|
| [diff](diff.md) | Inspect changes on a container's filesystem |
|
||||||
* [kill](kill.md)
|
| [events](events.md) | Get real time events from the server |
|
||||||
* [logs](logs.md)
|
| [exec](exec.md) | Run a command in a running container |
|
||||||
* [pause](pause.md)
|
| [kill](kill.md) | Kill a running container |
|
||||||
* [port](port.md)
|
| [logs](logs.md) | Fetch the logs of a container |
|
||||||
* [ps](ps.md)
|
| [pause](pause.md) | Pause all processes within a container |
|
||||||
* [rename](rename.md)
|
| [port](port.md) | List port mappings or a specific mapping for the container |
|
||||||
* [restart](restart.md)
|
| [ps](ps.md) | List containers |
|
||||||
* [rm](rm.md)
|
| [rename](rename.md) | Rename a container |
|
||||||
* [run](run.md)
|
| [restart](restart.md) | Restart a running container |
|
||||||
* [start](start.md)
|
| [rm](rm.md) | Remove one or more containers |
|
||||||
* [stats](stats.md)
|
| [run](run.md) | Run a command in a new container |
|
||||||
* [stop](stop.md)
|
| [start](start.md) | Start one or more stopped containers |
|
||||||
* [top](top.md)
|
| [stats](stats.md) | Display a live stream of container(s) resource usage statistics |
|
||||||
* [unpause](unpause.md)
|
| [stop](stop.md) | Stop a running container |
|
||||||
* [update](update.md)
|
| [top](top.md) | Display the running processes of a container |
|
||||||
* [wait](wait.md)
|
| [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 |
|
||||||
|
|
||||||
### Hub and registry commands
|
### Hub and registry commands
|
||||||
|
|
||||||
* [login](login.md)
|
| Command | Description |
|
||||||
* [logout](logout.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [pull](pull.md)
|
| [login](login.md) | Register or log in to a Docker registry |
|
||||||
* [push](push.md)
|
| [logout](logout.md) | Log out from a Docker registry |
|
||||||
* [search](search.md)
|
| [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 |
|
||||||
|
|
||||||
### Network and connectivity commands
|
### Network and connectivity commands
|
||||||
|
|
||||||
* [network_connect](network_connect.md)
|
| Command | Description |
|
||||||
* [network_create](network_create.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [network_disconnect](network_disconnect.md)
|
| [network connect](network_connect.md) | Connect a container to a network |
|
||||||
* [network_inspect](network_inspect.md)
|
| [network create](network_create.md) | Create a new network |
|
||||||
* [network_ls](network_ls.md)
|
| [network disconnect](network_disconnect.md) | Disconnect a container from a network |
|
||||||
* [network_rm](network_rm.md)
|
| [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 |
|
||||||
|
|
||||||
|
|
||||||
### Shared data volume commands
|
### Shared data volume commands
|
||||||
|
|
||||||
* [volume_create](volume_create.md)
|
| Command | Description |
|
||||||
* [volume_inspect](volume_inspect.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [volume_ls](volume_ls.md)
|
| [volume create](volume_create.md) | Creates a new volume where containers can consume and store data |
|
||||||
* [volume_rm](volume_rm.md)
|
| [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 |
|
||||||
|
|
||||||
|
|
||||||
### Swarm node commands
|
### Swarm node commands
|
||||||
|
|
||||||
* [node_accept](node_accept.md)
|
| Command | Description |
|
||||||
* [node_promote](node_promote.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [node_demote](node_demote.md)
|
| [node accept](node_accept.md) | Accept a node into the swarm |
|
||||||
* [node_inspect](node_inspect.md)
|
| [node promote](node_promote.md) | Promote a node that is pending a promotion to manager |
|
||||||
* [node_update](node_update.md)
|
| [node demote](node_demote.md) | Demotes an existing manager so that it is no longer a manager |
|
||||||
* [node_tasks](node_tasks.md)
|
| [node inspect](node_inspect.md) | Inspect a node in the swarm |
|
||||||
* [node_ls](node_ls.md)
|
| [node update](node_update.md) | Update attributes for a node |
|
||||||
* [node_rm](node_rm.md)
|
| [node tasks](node_tasks.md) | List tasks running on a node |
|
||||||
|
| [node ls](node_ls.md) | List nodes in the swarm |
|
||||||
|
| [node rm](node_rm.md) | Remove a node from the swarm |
|
||||||
|
|
||||||
### Swarm swarm commands
|
### Swarm swarm commands
|
||||||
|
|
||||||
* [swarm init](swarm_init.md)
|
| Command | Description |
|
||||||
* [swarm join](swarm_join.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [swarm leave](swarm_leave.md)
|
| [swarm init](swarm_init.md) | Initialize a Swarm |
|
||||||
* [swarm update](swarm_update.md)
|
| [swarm join](swarm_join.md) | Join a Swarm as a manager node or worker node |
|
||||||
|
| [swarm leave](swarm_leave.md) | Remove the current node from the swarm |
|
||||||
|
| [swarm update](swarm_update.md) | Update attributes of a swarm |
|
||||||
|
|
||||||
### Swarm service commands
|
### Swarm service commands
|
||||||
|
|
||||||
* [service create](service_create.md)
|
| Command | Description |
|
||||||
* [service inspect](service_inspect.md)
|
|:--------|:-------------------------------------------------------------------|
|
||||||
* [service ls](service_ls.md)
|
| [service create](service_create.md) | Create a new service |
|
||||||
* [service rm](service_rm.md)
|
| [service inspect](service_inspect.md) | Inspect a service |
|
||||||
* [service scale](service_scale.md)
|
| [service ls](service_ls.md) | List services in the swarm |
|
||||||
* [service tasks](service_tasks.md)
|
| [service rm](service_rm.md) | Reemove a swervice from the swarm |
|
||||||
* [service update](service_update.md)
|
| [service scale](service_scale.md) | Set the number of replicas for the desired state of the service |
|
||||||
|
| [service tasks](service_tasks.md) | List the tasks of a service |
|
||||||
|
| [service update](service_update.md) | Update the attributes of a service |
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<!-- [metadata]>
|
||||||
|
+++
|
||||||
|
title = "Command line reference"
|
||||||
|
description = "Docker's CLI command description and usage"
|
||||||
|
keywords = ["Docker, Docker documentation, CLI, command line"]
|
||||||
|
[menu.main]
|
||||||
|
identifier= "smn_cli"
|
||||||
|
parent = "engine_ref"
|
||||||
|
weight=-75
|
||||||
|
+++
|
||||||
|
<![end-metadata]-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# The Docker commands
|
||||||
|
|
||||||
|
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).
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
For a list of Docker commands see [Command line reference guide](index.md).
|
|
@ -12,7 +12,7 @@ parent = "smn_cli"
|
||||||
|
|
||||||
Usage: docker network ls [OPTIONS]
|
Usage: docker network ls [OPTIONS]
|
||||||
|
|
||||||
Lists all the networks created by the user
|
List networks
|
||||||
-f, --filter=[] Filter output based on conditions provided
|
-f, --filter=[] Filter output based on conditions provided
|
||||||
--help Print usage
|
--help Print usage
|
||||||
--no-trunc Do not truncate the output
|
--no-trunc Do not truncate the output
|
||||||
|
@ -35,10 +35,10 @@ Use the `--no-trunc` option to display the full network id:
|
||||||
```bash
|
```bash
|
||||||
docker network ls --no-trunc
|
docker network ls --no-trunc
|
||||||
NETWORK ID NAME DRIVER
|
NETWORK ID NAME DRIVER
|
||||||
18a2866682b85619a026c81b98a5e375bd33e1b0936a26cc497c283d27bae9b3 none null
|
18a2866682b85619a026c81b98a5e375bd33e1b0936a26cc497c283d27bae9b3 none null
|
||||||
c288470c46f6c8949c5f7e5099b5b7947b07eabe8d9a27d79a9cbf111adcbf47 host host
|
c288470c46f6c8949c5f7e5099b5b7947b07eabe8d9a27d79a9cbf111adcbf47 host host
|
||||||
7b369448dccbf865d397c8d2be0cda7cf7edc6b0945f77d2529912ae917a0185 bridge bridge
|
7b369448dccbf865d397c8d2be0cda7cf7edc6b0945f77d2529912ae917a0185 bridge bridge
|
||||||
95e74588f40db048e86320c6526440c504650a1ff3e9f7d60a497c4d2163e5bd foo bridge
|
95e74588f40db048e86320c6526440c504650a1ff3e9f7d60a497c4d2163e5bd foo bridge
|
||||||
63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161 dev bridge
|
63d1ff1f77b07ca51070a8c227e962238358bd310bde1529cf62e6c307ade161 dev bridge
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ c288470c46f6c8949c5f7e5099b5b7947b07eabe8d9a27d79a9cbf111adcbf47 host
|
||||||
|
|
||||||
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there
|
The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there
|
||||||
is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`).
|
is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`).
|
||||||
Multiple filter flags are combined as an `OR` filter. For example,
|
Multiple filter flags are combined as an `OR` filter. For example,
|
||||||
`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks.
|
`-f type=custom -f type=builtin` returns both `custom` and `builtin` networks.
|
||||||
|
|
||||||
The currently supported filters are:
|
The currently supported filters are:
|
||||||
|
@ -105,7 +105,7 @@ The following filter matches networks with the `usage` label regardless of its v
|
||||||
```bash
|
```bash
|
||||||
$ docker network ls -f "label=usage"
|
$ docker network ls -f "label=usage"
|
||||||
NETWORK ID NAME DRIVER
|
NETWORK ID NAME DRIVER
|
||||||
db9db329f835 test1 bridge
|
db9db329f835 test1 bridge
|
||||||
f6e212da9dfd test2 bridge
|
f6e212da9dfd test2 bridge
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ parent = "smn_cli"
|
||||||
|
|
||||||
Demote a node as manager in the swarm
|
Demote a node as manager in the swarm
|
||||||
|
|
||||||
Demotes an existing Manager so that it is no longer a manager. This command targets a docker engine that is a manager in the swarm cluster.
|
Demotes an existing manager so that it is no longer a manager. This command targets a docker engine that is a manager in the swarm cluster.
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -15,6 +15,7 @@ parent = "smn_cli"
|
||||||
|
|
||||||
Display detailed information on one or more nodes
|
Display detailed information on one or more nodes
|
||||||
|
|
||||||
|
|
||||||
-f, --format= Format the output using the given go template.
|
-f, --format= Format the output using the given go template.
|
||||||
--help Print usage
|
--help Print usage
|
||||||
-p, --pretty Print the information in a human friendly format.
|
-p, --pretty Print the information in a human friendly format.
|
||||||
|
|
|
@ -13,7 +13,7 @@ parent = "smn_cli"
|
||||||
|
|
||||||
Usage: docker swarm update [OPTIONS]
|
Usage: docker swarm update [OPTIONS]
|
||||||
|
|
||||||
update the Swarm.
|
Update the Swarm.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--auto-accept value Auto acceptance policy (worker, manager or none)
|
--auto-accept value Auto acceptance policy (worker, manager or none)
|
||||||
|
|
Loading…
Reference in New Issue