Sync docker/docker refs with files mistakenly edited in docker.github.io repo

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
This commit is contained in:
Misty Stanley-Jones 2016-10-19 10:25:45 -07:00 committed by Tibor Vass
parent 9012efce15
commit 7f36c3a1a0
105 changed files with 1074 additions and 112 deletions

View File

@ -1,5 +1,14 @@
# The non-reference docs have been moved! # The non-reference docs have been moved!
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
The documentation for Docker Engine has been merged into The documentation for Docker Engine has been merged into
[the general documentation repo](https://github.com/docker/docker.github.io). [the general documentation repo](https://github.com/docker/docker.github.io).

View File

@ -5,6 +5,15 @@ description: "Deprecated Features."
keywords: ["docker, documentation, about, technology, deprecate"] keywords: ["docker, documentation, about, technology, deprecate"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Deprecated Engine Features # Deprecated Engine Features
The following list of features are deprecated in Engine. The following list of features are deprecated in Engine.

View File

@ -8,6 +8,15 @@ keywords: ["API, Usage, plugins, documentation, developer"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Docker Engine managed plugin system # Docker Engine managed plugin system
This document describes the plugin system available today in the **experimental This document describes the plugin system available today in the **experimental

View File

@ -5,6 +5,15 @@ description: "How to add additional functionality to Docker with plugins extensi
keywords: ["Examples, Usage, plugins, docker, documentation, user guide"] keywords: ["Examples, Usage, plugins, docker, documentation, user guide"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Use Docker Engine plugins # Use Docker Engine plugins
This document describes the Docker Engine plugins generally available in Docker This document describes the Docker Engine plugins generally available in Docker

View File

@ -8,6 +8,15 @@ keywords: ["API, Usage, plugins, documentation, developer"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Plugin Manifest Version 0 of Plugin V2 # Plugin Manifest Version 0 of Plugin V2
This document outlines the format of the V0 plugin manifest. The plugin This document outlines the format of the V0 plugin manifest. The plugin

View File

@ -6,5 +6,13 @@ type: "menu"
identifier: "engine_extend" identifier: "engine_extend"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
<!--menu page not rendered--> <!--menu page not rendered-->

View File

@ -4,6 +4,15 @@ description: "How to write Docker plugins extensions "
keywords: ["API, Usage, plugins, documentation, developer"] keywords: ["API, Usage, plugins, documentation, developer"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Docker Plugin API # Docker Plugin API
Docker plugins are out-of-process extensions which add capabilities to the Docker plugins are out-of-process extensions which add capabilities to the

View File

@ -5,6 +5,14 @@ keywords: ["security, authorization, authentication, docker, documentation, plug
aliases: ["/engine/extend/authorization/"] aliases: ["/engine/extend/authorization/"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Create an authorization plugin # Create an authorization plugin

View File

@ -4,6 +4,15 @@ description: "Network driver plugins."
keywords: ["Examples, Usage, plugins, docker, documentation, user guide"] keywords: ["Examples, Usage, plugins, docker, documentation, user guide"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Engine network driver plugins # Engine network driver plugins
This document describes Docker Engine network driver plugins generally This document describes Docker Engine network driver plugins generally

View File

@ -4,6 +4,15 @@ description: "How to manage data with external volume plugins"
keywords: ["Examples, Usage, volume, docker, data, volumes, plugin, api"] keywords: ["Examples, Usage, volume, docker, data, volumes, plugin, api"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Write a volume plugin # Write a volume plugin
Docker Engine volume plugins enable Engine deployments to be integrated with Docker Engine volume plugins enable Engine deployments to be integrated with

View File

@ -4,6 +4,15 @@ description: "Dockerfiles use a simple DSL which allows you to automate the step
keywords: ["builder, docker, Dockerfile, automation, image creation"] keywords: ["builder, docker, Dockerfile, automation, image creation"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Dockerfile reference # Dockerfile reference
Docker can build images automatically by reading the instructions from a Docker can build images automatically by reading the instructions from a
@ -129,7 +138,7 @@ instruction must be \`FROM\`** in order to specify the [*Base
Image*](glossary.md#base-image) from which you are building. Image*](glossary.md#base-image) from which you are building.
Docker treats lines that *begin* with `#` as a comment, unless the line is Docker treats lines that *begin* with `#` as a comment, unless the line is
a valid [parser directive](builder.md#parser-directives). A `#` marker anywhere a valid [parser directive](#parser-directives). A `#` marker anywhere
else in a line is treated as an argument. This allows statements like: else in a line is treated as an argument. This allows statements like:
```Dockerfile ```Dockerfile
@ -1265,9 +1274,9 @@ The output of the final `pwd` command in this `Dockerfile` would be
ARG <name>[=<default value>] ARG <name>[=<default value>]
The `ARG` instruction defines a variable that users can pass at build-time to The `ARG` instruction defines a variable that users can pass at build-time to
the builder with the `docker build` command using the `--build-arg the builder with the `docker build` command using the
<varname>=<value>` flag. If a user specifies a build argument that was not `--build-arg <varname>=<value>` flag. If a user specifies a build argument
defined in the Dockerfile, the build outputs an error. that was not defined in the Dockerfile, the build outputs an error.
``` ```
One or more build-args were not consumed, failing build. One or more build-args were not consumed, failing build.
@ -1380,8 +1389,11 @@ corresponding `ARG` instruction in the Dockerfile.
* `NO_PROXY` * `NO_PROXY`
* `no_proxy` * `no_proxy`
To use these, simply pass them on the command line using the `--build-arg To use these, simply pass them on the command line using the flag:
<varname>=<value>` flag.
```
--build-arg <varname>=<value>
```
### Impact on build caching ### Impact on build caching

View File

@ -4,6 +4,15 @@ description: "The attach command description and usage"
keywords: ["attach, running, container"] keywords: ["attach, running, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# attach # attach
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The build command description and usage"
keywords: ["build, docker, image"] keywords: ["build, docker, image"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# build # build
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "Docker's CLI command description and usage"
keywords: ["Docker, Docker documentation, CLI, command line"] keywords: ["Docker, Docker documentation, CLI, command line"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# Use the Docker command line # Use the Docker command line
To list available commands, either run `docker` with no parameters To list available commands, either run `docker` with no parameters
@ -147,6 +156,7 @@ list of supported formatting directives, see the
Following is a sample `config.json` file: Following is a sample `config.json` file:
{% raw %}
{ {
"HttpHeaders": { "HttpHeaders": {
"MyHeader": "MyValue" "MyHeader": "MyValue"
@ -156,6 +166,7 @@ Following is a sample `config.json` file:
"serviceInspectFormat": "pretty", "serviceInspectFormat": "pretty",
"detachKeys": "ctrl-e,e" "detachKeys": "ctrl-e,e"
} }
{% endraw %}
### Notary ### Notary

View File

@ -4,6 +4,15 @@ description: "The commit command description and usage"
keywords: ["commit, file, changes"] keywords: ["commit, file, changes"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# commit # commit
```markdown ```markdown
@ -51,6 +60,7 @@ created. Supported `Dockerfile` instructions:
## Commit a container with new configurations ## Commit a container with new configurations
{% raw %}
$ docker ps $ docker ps
ID IMAGE COMMAND CREATED STATUS PORTS ID IMAGE COMMAND CREATED STATUS PORTS
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
@ -61,6 +71,7 @@ created. Supported `Dockerfile` instructions:
f5283438590d f5283438590d
$ docker inspect -f "{{ .Config.Env }}" f5283438590d $ docker inspect -f "{{ .Config.Env }}" f5283438590d
[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true] [HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEBUG=true]
{% endraw %}
## Commit a container with new `CMD` and `EXPOSE` instructions ## Commit a container with new `CMD` and `EXPOSE` instructions

View File

@ -4,6 +4,15 @@ description: "Remove all stopped containers"
keywords: [container, prune, delete, remove] keywords: [container, prune, delete, remove]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# container prune # container prune
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The cp command description and usage"
keywords: ["copy, container, files, folders"] keywords: ["copy, container, files, folders"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# cp # cp
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The create command description and usage"
keywords: ["docker, create, container"] keywords: ["docker, create, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# create # create
Creates a new container. Creates a new container.

View File

@ -5,6 +5,15 @@ keywords: ["stack, deploy"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack deploy (experimental) # stack deploy (experimental)
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The diff command description and usage"
keywords: ["list, changed, files, container"] keywords: ["list, changed, files, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# diff # diff
```markdown ```markdown

View File

@ -5,6 +5,15 @@ description: "The daemon command description and usage"
keywords: ["container, daemon, runtime"] keywords: ["container, daemon, runtime"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# daemon # daemon
```markdown ```markdown
@ -324,7 +333,6 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`.
$ sudo dockerd --storage-opt dm.basesize=50G $ sudo dockerd --storage-opt dm.basesize=50G
``` ```
This will increase the base device size to 50G. The Docker daemon will throw an This will increase the base device size to 50G. The Docker daemon will throw an
error if existing base device size is larger than 50G. A user can use error if existing base device size is larger than 50G. A user can use
this option to expand the base device size however shrinking is not permitted. this option to expand the base device size however shrinking is not permitted.
@ -631,7 +639,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`.
* `btrfs.min_space` * `btrfs.min_space`
Specifies the mininum size to use when creating the subvolume which is used Specifies the minimum size to use when creating the subvolume which is used
for containers. If user uses disk quota for btrfs when creating or running for containers. If user uses disk quota for btrfs when creating or running
a container with **--storage-opt size** option, docker should ensure the a container with **--storage-opt size** option, docker should ensure the
**size** cannot be smaller than **btrfs.min_space**. **size** cannot be smaller than **btrfs.min_space**.
@ -672,6 +680,7 @@ Runtimes can be registered with the daemon either via the
configuration file or using the `--add-runtime` command line argument. configuration file or using the `--add-runtime` command line argument.
The following is an example adding 2 runtimes via the configuration: The following is an example adding 2 runtimes via the configuration:
```json ```json
"default-runtime": "runc", "default-runtime": "runc",
"runtimes": { "runtimes": {

View File

@ -4,6 +4,15 @@ description: "The events command description and usage"
keywords: ["events, container, report"] keywords: ["events, container, report"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# events # events
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The exec command description and usage"
keywords: ["command, container, run, execute"] keywords: ["command, container, run, execute"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# exec # exec
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The export command description and usage"
keywords: ["export, file, system, container"] keywords: ["export, file, system, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# export # export
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The history command description and usage"
keywords: ["docker, image, history"] keywords: ["docker, image, history"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# history # history
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "Remove all stopped images"
keywords: [image, prune, delete, remove] keywords: [image, prune, delete, remove]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# image prune # image prune
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The images command description and usage"
keywords: ["list, docker, images"] keywords: ["list, docker, images"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# images # images
```markdown ```markdown
@ -245,6 +254,7 @@ output the data exactly as the template declares or, when using the
The following example uses a template without headers and outputs the The following example uses a template without headers and outputs the
`ID` and `Repository` entries separated by a colon for all images: `ID` and `Repository` entries separated by a colon for all images:
{% raw %}
$ docker images --format "{{.ID}}: {{.Repository}}" $ docker images --format "{{.ID}}: {{.Repository}}"
77af4d6b9913: <none> 77af4d6b9913: <none>
b6fa739cedf5: committ b6fa739cedf5: committ
@ -255,10 +265,12 @@ The following example uses a template without headers and outputs the
746b819f315e: postgres 746b819f315e: postgres
746b819f315e: postgres 746b819f315e: postgres
746b819f315e: postgres 746b819f315e: postgres
{% endraw %}
To list all images with their repository and tag in a table format you To list all images with their repository and tag in a table format you
can use: can use:
{% raw %}
$ docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" $ docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}"
IMAGE ID REPOSITORY TAG IMAGE ID REPOSITORY TAG
77af4d6b9913 <none> <none> 77af4d6b9913 <none> <none>
@ -270,3 +282,4 @@ can use:
746b819f315e postgres 9.3 746b819f315e postgres 9.3
746b819f315e postgres 9.3.5 746b819f315e postgres 9.3.5
746b819f315e postgres latest 746b819f315e postgres latest
{% endraw %}

View File

@ -4,6 +4,15 @@ description: "The import command description and usage"
keywords: ["import, file, system, container"] keywords: ["import, file, system, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# import # import
```markdown ```markdown

View File

@ -5,7 +5,14 @@ keywords: ["Docker, Docker documentation, CLI, command line"]
identifier: "smn_cli_guide" identifier: "smn_cli_guide"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# The Docker commands # The Docker commands

View File

@ -4,6 +4,15 @@ description: "The info command description and usage"
keywords: ["display, docker, information"] keywords: ["display, docker, information"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# info # info
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The inspect command description and usage"
keywords: ["inspect, container, json"] keywords: ["inspect, container, json"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# inspect # inspect
```markdown ```markdown
@ -34,29 +43,39 @@ describes all the details of the format.
For the most part, you can pick out any field from the JSON in a fairly For the most part, you can pick out any field from the JSON in a fairly
straightforward manner. straightforward manner.
{% raw %}
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID $ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID
{% endraw %}
**Get an instance's MAC address:** **Get an instance's MAC address:**
For the most part, you can pick out any field from the JSON in a fairly For the most part, you can pick out any field from the JSON in a fairly
straightforward manner. straightforward manner.
{% raw %}
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}' $INSTANCE_ID $ docker inspect --format='{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}' $INSTANCE_ID
{% endraw %}
**Get an instance's log path:** **Get an instance's log path:**
{% raw %}
$ docker inspect --format='{{.LogPath}}' $INSTANCE_ID $ docker inspect --format='{{.LogPath}}' $INSTANCE_ID
{% endraw %}
**Get a Task's image name:** **Get a Task's image name:**
{% raw %}
$ docker inspect --format='{{.Container.Spec.Image}}' $INSTANCE_ID $ docker inspect --format='{{.Container.Spec.Image}}' $INSTANCE_ID
{% endraw %}
**List all port bindings:** **List all port bindings:**
One can loop over arrays and maps in the results to produce simple text One can loop over arrays and maps in the results to produce simple text
output: output:
{% raw %}
$ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID $ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
{% endraw %}
**Find a specific port mapping:** **Find a specific port mapping:**
@ -68,7 +87,9 @@ numeric public port, you use `index` to find the specific port map, and
then `index` 0 contains the first object inside of that. Then we ask for then `index` 0 contains the first object inside of that. Then we ask for
the `HostPort` field to get the public address. the `HostPort` field to get the public address.
{% raw %}
$ docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID $ docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
{% endraw %}
**Get a subsection in JSON format:** **Get a subsection in JSON format:**
@ -77,4 +98,6 @@ fields, by default you get a Go-style dump of the inner values.
Docker adds a template function, `json`, which can be applied to get Docker adds a template function, `json`, which can be applied to get
results in JSON format. results in JSON format.
{% raw %}
$ docker inspect --format='{{json .Config}}' $INSTANCE_ID $ docker inspect --format='{{json .Config}}' $INSTANCE_ID
{% endraw %}

View File

@ -4,6 +4,15 @@ description: "The kill command description and usage"
keywords: ["container, kill, signal"] keywords: ["container, kill, signal"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# kill # kill
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The load command description and usage"
keywords: ["stdin, tarred, repository"] keywords: ["stdin, tarred, repository"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# load # load
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The login command description and usage"
keywords: ["registry, login, image"] keywords: ["registry, login, image"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# login # login
```markdown ```markdown
@ -48,12 +57,12 @@ This is the list of currently available credentials helpers and where
you can download them from: you can download them from:
- D-Bus Secret Service: https://github.com/docker/docker-credential-helpers/releases - D-Bus Secret Service: https://github.com/docker/docker-credential-helpers/releases
- Apple OS X keychain: https://github.com/docker/docker-credential-helpers/releases - Apple macOS keychain: https://github.com/docker/docker-credential-helpers/releases
- Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases - Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases
### Usage ### Usage
You need to speficy the credentials store in `$HOME/.docker/config.json` You need to specify the credentials store in `$HOME/.docker/config.json`
to tell the docker engine to use it: to tell the docker engine to use it:
```json ```json

View File

@ -4,6 +4,15 @@ description: "The logout command description and usage"
keywords: ["logout, docker, registry"] keywords: ["logout, docker, registry"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# logout # logout
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The logs command description and usage"
keywords: ["logs, retrieve, docker"] keywords: ["logs, retrieve, docker"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# logs # logs
```markdown ```markdown

View File

@ -5,7 +5,14 @@ keywords: ["Docker, Docker documentation, CLI, command line"]
identifier: "smn_cli" identifier: "smn_cli"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# The Docker commands # The Docker commands

View File

@ -4,6 +4,15 @@ description: "The network connect command description and usage"
keywords: ["network, connect, user-defined"] keywords: ["network, connect, user-defined"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network connect # network connect
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The network create command description and usage"
keywords: ["network, create"] keywords: ["network, create"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network create # network create
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The network disconnect command description and usage"
keywords: ["network, disconnect, user-defined"] keywords: ["network, disconnect, user-defined"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network disconnect # network disconnect
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The network inspect command description and usage"
keywords: ["network, inspect, user-defined"] keywords: ["network, inspect, user-defined"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network inspect # network inspect
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The network ls command description and usage"
keywords: ["network, list, user-defined"] keywords: ["network, list, user-defined"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# docker network ls # docker network ls
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "the network rm command description and usage"
keywords: ["network, rm, user-defined"] keywords: ["network, rm, user-defined"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# network rm # network rm
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The node demote command description and usage"
keywords: ["node, demote"] keywords: ["node, demote"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node demote # node demote
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The node inspect command description and usage"
keywords: ["node, inspect"] keywords: ["node, inspect"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node inspect # node inspect
```markdown ```markdown
@ -89,8 +98,10 @@ Example output:
} }
] ]
{% raw %}
$ docker node inspect --format '{{ .ManagerStatus.Leader }}' self $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self
false false
{% endraw %}
$ docker node inspect --pretty self $ docker node inspect --pretty self
ID: e216jshn25ckzbvmwlnh5jr3g ID: e216jshn25ckzbvmwlnh5jr3g

View File

@ -4,6 +4,15 @@ description: "The node ls command description and usage"
keywords: ["node, list"] keywords: ["node, list"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node ls # node ls
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The node promote command description and usage"
keywords: ["node, promote"] keywords: ["node, promote"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node promote # node promote
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["node, tasks", "ps"]
aliases: ["/engine/reference/commandline/node_tasks/"] aliases: ["/engine/reference/commandline/node_tasks/"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node ps # node ps
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The node rm command description and usage"
keywords: ["node, remove"] keywords: ["node, remove"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# node rm # node rm
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The node update command description and usage"
keywords: ["resources, update, dynamically"] keywords: ["resources, update, dynamically"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
## update ## update
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The pause command description and usage"
keywords: ["cgroups, container, suspend, SIGSTOP"] keywords: ["cgroups, container, suspend, SIGSTOP"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# pause # pause
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, disable"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin disable (experimental) # plugin disable (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, enable"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin enable (experimental) # plugin enable (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, inspect"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin inspect (experimental) # plugin inspect (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, install"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin install (experimental) # plugin install (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, list"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin ls (experimental) # plugin ls (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["plugin, rm"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# plugin rm (experimental) # plugin rm (experimental)
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The port command description and usage"
keywords: ["port, mapping, container"] keywords: ["port, mapping, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# port # port
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The ps command description and usage"
keywords: ["container, running, list"] keywords: ["container, running, list"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# ps # ps
```markdown ```markdown
@ -145,6 +154,7 @@ $ docker ps -a --filter 'exited=137'
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b3e1c0ed5bfe ubuntu:latest "sleep 1000" 12 seconds ago Exited (137) 5 seconds ago grave_kowalevski b3e1c0ed5bfe ubuntu:latest "sleep 1000" 12 seconds ago Exited (137) 5 seconds ago grave_kowalevski
a2eb5558d669 redis:latest "/entrypoint.sh redi 2 hours ago Exited (137) 2 hours ago sharp_lalande a2eb5558d669 redis:latest "/entrypoint.sh redi 2 hours ago Exited (137) 2 hours ago sharp_lalande
```
Any of these events result in a `137` status: Any of these events result in a `137` status:
@ -271,7 +281,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
The `volume` filter shows only containers that mount a specific volume or have The `volume` filter shows only containers that mount a specific volume or have
a volume mounted in a specific path: a volume mounted in a specific path:
```bash ```bash{% raw %}
$ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}" $ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}"
CONTAINER ID MOUNTS CONTAINER ID MOUNTS
9c3527ed70ce remote-volume 9c3527ed70ce remote-volume
@ -279,7 +289,7 @@ CONTAINER ID MOUNTS
$ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}" $ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}"
CONTAINER ID MOUNTS CONTAINER ID MOUNTS
9c3527ed70ce remote-volume 9c3527ed70ce remote-volume
``` {% endraw %}```
#### Network #### Network
@ -304,7 +314,9 @@ example shows all containers that are attached to the `net1` network, using
the network id as a filter; the network id as a filter;
```bash ```bash
{% raw %}
$ docker network inspect --format "{{.ID}}" net1 $ docker network inspect --format "{{.ID}}" net1
{% endraw %}
8c0b4110ae930dbe26b258de9bc34a03f98056ed6f27f991d32919bfe401d7c5 8c0b4110ae930dbe26b258de9bc34a03f98056ed6f27f991d32919bfe401d7c5
@ -333,7 +345,7 @@ Placeholder | Description
`.Size` | Container disk size. `.Size` | Container disk size.
`.Names` | Container names. `.Names` | Container names.
`.Labels` | All labels assigned to the container. `.Labels` | All labels assigned to the container.
`.Label` | Value of a specific label for this container. For example `'{{.Label "com.docker.swarm.cpu"}}'` `.Label` | Value of a specific label for this container. For example `'{% raw %}{{.Label "com.docker.swarm.cpu"}}{% endraw %}'`
`.Mounts` | Names of the volumes mounted in this container. `.Mounts` | Names of the volumes mounted in this container.
When using the `--format` option, the `ps` command will either output the data When using the `--format` option, the `ps` command will either output the data
@ -344,7 +356,9 @@ The following example uses a template without headers and outputs the `ID` and
`Command` entries separated by a colon for all running containers: `Command` entries separated by a colon for all running containers:
```bash ```bash
{% raw %}
$ docker ps --format "{{.ID}}: {{.Command}}" $ docker ps --format "{{.ID}}: {{.Command}}"
{% endraw %}
a87ecb4f327c: /bin/sh -c #(nop) MA a87ecb4f327c: /bin/sh -c #(nop) MA
01946d9d34d8: /bin/sh -c #(nop) MA 01946d9d34d8: /bin/sh -c #(nop) MA
@ -355,7 +369,9 @@ c1d3b0166030: /bin/sh -c yum -y up
To list all running containers with their labels in a table format you can use: To list all running containers with their labels in a table format you can use:
```bash ```bash
{% raw %}
$ docker ps --format "table {{.ID}}\t{{.Labels}}" $ docker ps --format "table {{.ID}}\t{{.Labels}}"
{% endraw %}
CONTAINER ID LABELS CONTAINER ID LABELS
a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd

View File

@ -4,6 +4,15 @@ description: "The pull command description and usage"
keywords: ["pull, image, hub, docker"] keywords: ["pull, image, hub, docker"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# pull # pull
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The push command description and usage"
keywords: ["share, push, image"] keywords: ["share, push, image"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# push # push
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The rename command description and usage"
keywords: ["rename, docker, container"] keywords: ["rename, docker, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# rename # rename
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The restart command description and usage"
keywords: ["restart, container, Docker"] keywords: ["restart, container, Docker"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# restart # restart
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The rm command description and usage"
keywords: ["remove, Docker, container"] keywords: ["remove, Docker, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# rm # rm
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The rmi command description and usage"
keywords: ["remove, image, Docker"] keywords: ["remove, image, Docker"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# rmi # rmi
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The run command description and usage"
keywords: ["run, command, container"] keywords: ["run, command, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# run # run
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The save command description and usage"
keywords: ["tarred, repository, backup"] keywords: ["tarred, repository, backup"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# save # save
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The search command description and usage"
keywords: ["search, hub, images"] keywords: ["search, hub, images"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# search # search
```markdown ```markdown
@ -76,7 +85,7 @@ at least 3 stars and the description isn't truncated in the output:
## Limit search results (--limit) ## Limit search results (--limit)
The flag `--limit` is the maximium number of results returned by a search. This value could The flag `--limit` is the maximum number of results returned by a search. This value could
be in the range between 1 and 100. The default value of `--limit` is 25. be in the range between 1 and 100. The default value of `--limit` is 25.

View File

@ -4,6 +4,15 @@ description: "The service create command description and usage"
keywords: ["service, create"] keywords: ["service, create"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service create # service create
```Markdown ```Markdown

View File

@ -4,6 +4,15 @@ description: "The service inspect command description and usage"
keywords: ["service, inspect"] keywords: ["service, inspect"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service inspect # service inspect
```Markdown ```Markdown
@ -136,10 +145,10 @@ The `--format` option can be used to obtain specific information about a
service. For example, the following command outputs the number of replicas service. For example, the following command outputs the number of replicas
of the "redis" service. of the "redis" service.
```bash ```bash{% raw %}
$ docker service inspect --format='{{.Spec.Mode.Replicated.Replicas}}' redis $ docker service inspect --format='{{.Spec.Mode.Replicated.Replicas}}' redis
10 10
``` {% endraw %}```
## Related information ## Related information

View File

@ -4,6 +4,15 @@ description: "The service ls command description and usage"
keywords: ["service, ls"] keywords: ["service, ls"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service ls # service ls
```Markdown ```Markdown

View File

@ -5,6 +5,15 @@ keywords: ["service, tasks", "ps"]
aliases: ["/engine/reference/commandline/service_tasks/"] aliases: ["/engine/reference/commandline/service_tasks/"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service ps # service ps
```Markdown ```Markdown

View File

@ -4,6 +4,15 @@ description: "The service rm command description and usage"
keywords: ["service, rm"] keywords: ["service, rm"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service rm # service rm
```Markdown ```Markdown

View File

@ -4,6 +4,15 @@ description: "The service scale command description and usage"
keywords: ["service, scale"] keywords: ["service, scale"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service scale # service scale
```markdown ```markdown
@ -19,8 +28,10 @@ Options:
### Scale a service ### Scale a service
If you scale a service, you set the *desired* number of replicas. Even though The scale command enables you to scale one or more services either up or down to
the command returns directly, actual scaling of the service may take some time. the desired number of replicas. The command will return immediately, but the
actual scaling of the service may take some time. To stop all replicas of a
service while keeping the service active in the swarm you can set the scale to 0.
For example, the following command scales the "frontend" service to 50 tasks. For example, the following command scales the "frontend" service to 50 tasks.
@ -30,7 +41,7 @@ frontend scaled to 50
``` ```
Directly afterwards, run `docker service ls`, to see the actual number of Directly afterwards, run `docker service ls`, to see the actual number of
replicas replicas.
```bash ```bash
$ docker service ls --filter name=frontend $ docker service ls --filter name=frontend
@ -40,7 +51,7 @@ ID NAME REPLICAS IMAGE COMMAND
``` ```
You can also scale a service using the [`docker service update`](service_update.md) You can also scale a service using the [`docker service update`](service_update.md)
command. The following commands are therefore equivalent: command. The following commands are equivalent:
```bash ```bash
$ docker service scale frontend=50 $ docker service scale frontend=50

View File

@ -4,6 +4,15 @@ description: "The service update command description and usage"
keywords: ["service, update"] keywords: ["service, update"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# service update # service update
```Markdown ```Markdown

View File

@ -5,6 +5,15 @@ keywords: ["stack, config"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack config (experimental) # stack config (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["stack, deploy, up"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack deploy (experimental) # stack deploy (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["stack, ls"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack ls (experimental) # stack ls (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["stack, ps"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack ps (experimental) # stack ps (experimental)
```markdown ```markdown

View File

@ -3,10 +3,17 @@ title: "stack rm"
description: "The stack rm command description and usage" description: "The stack rm command description and usage"
keywords: ["stack, rm, remove, down"] keywords: ["stack, rm, remove, down"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack rm (experimental) # stack rm (experimental)
```markdown ```markdown

View File

@ -5,6 +5,15 @@ keywords: ["stack, services"]
advisory: "experimental" advisory: "experimental"
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stack services (experimental) # stack services (experimental)
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The start command description and usage"
keywords: ["Start, container, stopped"] keywords: ["Start, container, stopped"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# start # start
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The stats command description and usage"
keywords: ["container, resource, statistics"] keywords: ["container, resource, statistics"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stats # stats
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The stop command description and usage"
keywords: ["stop, SIGKILL, SIGTERM"] keywords: ["stop, SIGKILL, SIGTERM"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# stop # stop
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The swarm init command description and usage"
keywords: ["swarm, init"] keywords: ["swarm, init"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# swarm init # swarm init
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The swarm join command description and usage"
keywords: ["swarm, join"] keywords: ["swarm, join"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# swarm join # swarm join
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The swarm join-token command description and usage"
keywords: ["swarm, join-token"] keywords: ["swarm, join-token"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# swarm join-token # swarm join-token
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The swarm leave command description and usage"
keywords: ["swarm, leave"] keywords: ["swarm, leave"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# swarm leave # swarm leave
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The swarm update command description and usage"
keywords: ["swarm, update"] keywords: ["swarm, update"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# swarm update # swarm update
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The system df command description and usage"
keywords: [system, data, usage, disk] keywords: [system, data, usage, disk]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# system df # system df
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "Remove unused data"
keywords: [system, prune, delete, remove] keywords: [system, prune, delete, remove]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# system prune # system prune
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The tag command description and usage"
keywords: ["tag, name, image"] keywords: ["tag, name, image"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# tag # tag
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The top command description and usage"
keywords: ["container, running, processes"] keywords: ["container, running, processes"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# top # top
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The unpause command description and usage"
keywords: ["cgroups, suspend, container"] keywords: ["cgroups, suspend, container"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# unpause # unpause
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The update command description and usage"
keywords: ["resources, update, dynamically"] keywords: ["resources, update, dynamically"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
## update ## update
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The version command description and usage"
keywords: ["version, architecture, api"] keywords: ["version, architecture, api"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# version # version
```markdown ```markdown
@ -45,10 +54,14 @@ describes all the details of the format.
**Get server version:** **Get server version:**
{% raw %}
$ docker version --format '{{.Server.Version}}' $ docker version --format '{{.Server.Version}}'
1.8.0 1.8.0
{% endraw %}
**Dump raw data:** **Dump raw data:**
{% raw %}
$ docker version --format '{{json .}}' $ docker version --format '{{json .}}'
{"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}} {"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}}
{% endraw %}

View File

@ -4,6 +4,15 @@ description: "The volume create command description and usage"
keywords: ["volume, create"] keywords: ["volume, create"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# volume create # volume create
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "The volume inspect command description and usage"
keywords: ["volume, inspect"] keywords: ["volume, inspect"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# volume inspect # volume inspect
```markdown ```markdown
@ -36,8 +45,10 @@ Example output:
} }
] ]
{% raw %}
$ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d $ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d
/var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data /var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data
{% endraw %}
## Related information ## Related information

View File

@ -4,6 +4,15 @@ description: "The volume ls command description and usage"
keywords: ["volume, list"] keywords: ["volume, list"]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# volume ls # volume ls
```markdown ```markdown

View File

@ -4,6 +4,15 @@ description: "Remove unused volumes"
keywords: [volume, prune, delete] keywords: [volume, prune, delete]
--- ---
<!-- This file is maintained within the docker/docker Github
repository at https://github.com/docker/docker/. Make all
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
# volume prune # volume prune
```markdown ```markdown

Some files were not shown because too many files have changed in this diff Show More