mirror of https://github.com/docker/docs.git
Sync vnext-engine branch to docker/docker SHA 2f12d2808464dcfdf45e0920fd508ce0ff12bd29
This branch will contain forward-looking Engine-specific docs and be the equivalent of docker/docker master for docs
This commit is contained in:
parent
4a833da9f3
commit
e4bce35ac2
|
|
@ -1,16 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/ambassador_pattern_linking/
|
||||
description: Using the Ambassador pattern to abstract (network) services
|
||||
keywords:
|
||||
- Examples, Usage, links, docker, documentation, examples, names, name, container
|
||||
naming
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: 15
|
||||
title: Link via an ambassador container
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/ambassador_pattern_linking/"]
|
||||
title = "Link via an ambassador container"
|
||||
description = "Using the Ambassador pattern to abstract (network) services"
|
||||
keywords = ["Examples, Usage, links, docker, documentation, examples, names, name, container naming"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight = 15
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Link via an ambassador container
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
description: Resizing a Boot2Docker volume in VirtualBox with GParted
|
||||
draft: "true"
|
||||
keywords:
|
||||
- boot2docker, volume, virtualbox
|
||||
menu:
|
||||
main:
|
||||
parent: smn_win_osx
|
||||
title: "Resizing a Boot2Docker volume\t"
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
title = "Resizing a Boot2Docker volume "
|
||||
description = "Resizing a Boot2Docker volume in VirtualBox with GParted"
|
||||
keywords = ["boot2docker, volume, virtualbox"]
|
||||
[menu.main]
|
||||
parent = "smn_win_osx"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Getting “no space left on device” errors with Boot2Docker?
|
||||
# Getting "no space left on device" errors with Boot2Docker?
|
||||
|
||||
If you're using Boot2Docker with a large number of images, or the images you're
|
||||
working with are very large, your pulls might start failing with "no space left
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/chef/
|
||||
description: Installation and using Docker via Chef
|
||||
keywords:
|
||||
- chef, installation, usage, docker, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "11"
|
||||
title: Using Chef
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/chef/"]
|
||||
title = "Using Chef"
|
||||
description = "Installation and using Docker via Chef"
|
||||
keywords = ["chef, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="11"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Chef
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/dsc/
|
||||
description: Using DSC to configure a new Docker host
|
||||
keywords:
|
||||
- powershell, dsc, installation, usage, docker, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "10"
|
||||
title: PowerShell DSC Usage
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/dsc/"]
|
||||
title = "PowerShell DSC Usage"
|
||||
description = "Using DSC to configure a new Docker host"
|
||||
keywords = ["powershell, dsc, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="10"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using PowerShell DSC
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: CLI and log output formatting reference
|
||||
keywords:
|
||||
- format, formatting, output, templates, log
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: 7
|
||||
title: Format command and log output
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Format command and log output"
|
||||
description = "CLI and log output formatting reference"
|
||||
keywords = ["format, formatting, output, templates, log"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight=7
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Formatting reference
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ list of elements they support in their templates:
|
|||
- [Docker Log Tag formatting](logging/log_tags.md)
|
||||
- [Docker Network Inspect formatting](../reference/commandline/network_inspect.md)
|
||||
- [Docker PS formatting](../reference/commandline/ps.md#formatting)
|
||||
- [Docker Stats formatting](../reference/commandline/stats.md#formatting)
|
||||
- [Docker Volume Inspect formatting](../reference/commandline/volume_inspect.md)
|
||||
- [Docker Version formatting](../reference/commandline/version.md#examples)
|
||||
|
||||
|
|
@ -33,46 +34,34 @@ This is the complete list of the available functions with examples:
|
|||
Join concatenates a list of strings to create a single string.
|
||||
It puts a separator between each element in the list.
|
||||
|
||||
{% raw %}
|
||||
$ docker ps --format '{{join .Names " or "}}'
|
||||
{% endraw %}
|
||||
|
||||
### Json
|
||||
|
||||
Json encodes an element as a json string.
|
||||
|
||||
{% raw %}
|
||||
$ docker inspect --format '{{json .Mounts}}' container
|
||||
{% endraw %}
|
||||
|
||||
### Lower
|
||||
|
||||
Lower turns a string into its lower case representation.
|
||||
|
||||
{% raw %}
|
||||
$ docker inspect --format "{{lower .Name}}" container
|
||||
{% endraw %}
|
||||
|
||||
### Split
|
||||
|
||||
Split slices a string into a list of strings separated by a separator.
|
||||
|
||||
{% raw %}
|
||||
# docker inspect --format '{{split (join .Names "/") "/"}}' container
|
||||
{% endraw %}
|
||||
|
||||
### Title
|
||||
|
||||
Title capitalizes a string.
|
||||
|
||||
{% raw %}
|
||||
$ docker inspect --format "{{title .Name}}" container
|
||||
{% endraw %}
|
||||
|
||||
### Upper
|
||||
|
||||
Upper turns a string into its upper case representation.
|
||||
Upper turms a string into its upper case representation.
|
||||
|
||||
{% raw %}
|
||||
$ docker inspect --format "{{upper .Name}}" container
|
||||
{% endraw %}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/host_integration/
|
||||
description: How to generate scripts for upstart, systemd, etc.
|
||||
keywords:
|
||||
- systemd, upstart, supervisor, docker, documentation, host integration
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "5"
|
||||
title: Automatically start containers
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/host_integration/"]
|
||||
title = "Automatically start containers"
|
||||
description = "How to generate scripts for upstart, systemd, etc."
|
||||
keywords = ["systemd, upstart, supervisor, docker, documentation, host integration"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="5"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Automatically start containers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/configuring/
|
||||
- /engine/admin/configuring/
|
||||
description: Configuring and running the Docker daemon on various distributions
|
||||
keywords:
|
||||
- docker, daemon, configuration, running, process managers
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: 0
|
||||
title: Configuring and running Docker
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/articles/configuring/",
|
||||
"/engine/admin/configuring/"
|
||||
]
|
||||
title = "Configuring and running Docker"
|
||||
description = "Configuring and running the Docker daemon on various distributions"
|
||||
keywords = ["docker, daemon, configuration, running, process managers"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight = 0
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Configuring and running Docker on various distributions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: How to keep containers running when the daemon isn't available.
|
||||
keywords:
|
||||
- docker, upgrade, daemon, dockerd, live-restore, daemonless container
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "6"
|
||||
title: Keep containers alive during daemon downtime
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Keep containers alive during daemon downtime"
|
||||
description = "How to keep containers running when the daemon isn't available."
|
||||
keywords = ["docker, upgrade, daemon, dockerd, live-restore, daemonless container"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="6"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Keep containers alive during daemon downtime
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/awslogs/
|
||||
description: Describes how to use the Amazon CloudWatch Logs logging driver.
|
||||
keywords:
|
||||
- AWS, Amazon, CloudWatch, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: Amazon CloudWatch Logs logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/awslogs/"]
|
||||
title = "Amazon CloudWatch Logs logging driver"
|
||||
description = "Describes how to use the Amazon CloudWatch Logs logging driver."
|
||||
keywords = ["AWS, Amazon, CloudWatch, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Amazon CloudWatch Logs logging driver
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
description: Describes how to use the etwlogs logging driver.
|
||||
keywords:
|
||||
- ETW, docker, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: ETW logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "ETW logging driver"
|
||||
description = "Describes how to use the etwlogs logging driver."
|
||||
keywords = ["ETW, docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# ETW logging driver
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/fluentd/
|
||||
description: Describes how to use the fluentd logging driver.
|
||||
keywords:
|
||||
- Fluentd, docker, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: Fluentd logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/fluentd/"]
|
||||
title = "Fluentd logging driver"
|
||||
description = "Describes how to use the fluentd logging driver."
|
||||
keywords = ["Fluentd, docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Fluentd logging driver
|
||||
|
||||
|
|
@ -33,10 +32,8 @@ The `docker logs` command is not available for this logging driver.
|
|||
|
||||
Some options are supported by specifying `--log-opt` as many times as needed:
|
||||
|
||||
{% raw %}
|
||||
- `fluentd-address`: specify `host:port` to connect `localhost:24224`
|
||||
- `tag`: specify tag for fluentd message, which interpret some markup, ex `{{.ID}}`, `{{.FullID}}` or `{{.Name}}` `docker.{{.ID}}`
|
||||
{% endraw %}
|
||||
|
||||
|
||||
Configure the default logging driver by passing the
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Describes how to use the Google Cloud Logging driver.
|
||||
keywords:
|
||||
- gcplogs, google, docker, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: Google Cloud Logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Google Cloud Logging driver"
|
||||
description = "Describes how to use the Google Cloud Logging driver."
|
||||
keywords = ["gcplogs, google, docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Google Cloud Logging driver
|
||||
|
||||
|
|
@ -37,6 +37,10 @@ The `--gcp-project` takes precedence over information discovered from the metada
|
|||
so a Docker daemon running in a Google Cloud Project can be overridden to log to a different
|
||||
Google Cloud Project using `--gcp-project`.
|
||||
|
||||
Docker fetches the values for zone, instance name and instance id from Google
|
||||
Cloud metadata server. Those values can be provided via options if metadata
|
||||
server is not available. They will not override the values from metadata server.
|
||||
|
||||
## gcplogs options
|
||||
|
||||
You can use the `--log-opt NAME=VALUE` flag to specify these additional Google
|
||||
|
|
@ -48,6 +52,9 @@ Cloud Logging driver options:
|
|||
| `gcp-log-cmd` | optional | Whether to log the command that the container was started with. Defaults to false. |
|
||||
| `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for container. |
|
||||
| `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for container. |
|
||||
| `gcp-meta-zone` | optional | Zone name for the instance. |
|
||||
| `gcp-meta-name` | optional | Instance name. |
|
||||
| `gcp-meta-id` | optional | Instance ID. |
|
||||
|
||||
If there is collision between `label` and `env` keys, the value of the `env`
|
||||
takes precedence. Both options add additional fields to the attributes of a
|
||||
|
|
@ -57,13 +64,22 @@ Below is an example of the logging options required to log to the default
|
|||
logging destination which is discovered by querying the GCE metadata server.
|
||||
|
||||
docker run --log-driver=gcplogs \
|
||||
--log-opt labels=location
|
||||
--log-opt env=TEST
|
||||
--log-opt gcp-log-cmd=true
|
||||
--env "TEST=false"
|
||||
--label location=west
|
||||
--log-opt labels=location \
|
||||
--log-opt env=TEST \
|
||||
--log-opt gcp-log-cmd=true \
|
||||
--env "TEST=false" \
|
||||
--label location=west \
|
||||
your/application
|
||||
|
||||
This configuration also directs the driver to include in the payload the label
|
||||
`location`, the environment variable `ENV`, and the command used to start the
|
||||
container.
|
||||
|
||||
An example of the logging options for running outside of GCE (the daemon must be
|
||||
configured with GOOGLE_APPLICATION_CREDENTIALS):
|
||||
|
||||
docker run --log-driver=gcplogs \
|
||||
--log-opt gcp-project=test-project
|
||||
--log-opt gcp-meta-zone=west1 \
|
||||
--log-opt gcp-meta-name=`hostname` \
|
||||
your/application
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/
|
||||
description: Logging and Logging Drivers
|
||||
keywords:
|
||||
- ' docker, logging, driver'
|
||||
menu:
|
||||
main:
|
||||
identifier: smn_logging
|
||||
parent: engine_admin
|
||||
weight: 9
|
||||
title: Logging
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/"]
|
||||
title = "Logging"
|
||||
description = "Logging and Logging Drivers"
|
||||
keywords = [" docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
identifier = "smn_logging"
|
||||
weight=9
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Logging Drivers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/journald/
|
||||
description: Describes how to use the fluentd logging driver.
|
||||
keywords:
|
||||
- Journald, docker, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: Journald logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/journald/"]
|
||||
title = "Journald logging driver"
|
||||
description = "Describes how to use the fluentd logging driver."
|
||||
keywords = ["Journald, docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Journald logging driver
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/log_tags/
|
||||
description: Describes how to format tags for.
|
||||
keywords:
|
||||
- docker, logging, driver, syslog, Fluentd, gelf, journald
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
weight: -1
|
||||
title: Log tags for logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/log_tags/"]
|
||||
title = "Log tags for logging driver"
|
||||
description = "Describes how to format tags for."
|
||||
keywords = ["docker, logging, driver, syslog, Fluentd, gelf, journald"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
weight = -1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Log Tags
|
||||
|
||||
|
|
@ -23,7 +22,6 @@ docker run --log-driver=fluentd --log-opt fluentd-address=myhost.local:24224 --l
|
|||
|
||||
Docker supports some special template markup you can use when specifying a tag's value:
|
||||
|
||||
{% raw %}
|
||||
| Markup | Description |
|
||||
|--------------------|------------------------------------------------------|
|
||||
| `{{.ID}}` | The first 12 characters of the container id. |
|
||||
|
|
@ -35,18 +33,15 @@ Docker supports some special template markup you can use when specifying a tag's
|
|||
| `{{.DaemonName}}` | The name of the docker program (`docker`). |
|
||||
|
||||
For example, specifying a `--log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}"` value yields `syslog` log lines like:
|
||||
{% endraw %}
|
||||
|
||||
```
|
||||
Aug 7 18:33:19 HOSTNAME docker/hello-world/foobar/5790672ab6a0[9103]: Hello from Docker.
|
||||
```
|
||||
|
||||
{% raw %}
|
||||
At startup time, the system sets the `container_name` field and `{{.Name}}` in
|
||||
the tags. If you use `docker rename` to rename a container, the new name is not
|
||||
reflected in the log messages. Instead, these messages continue to use the
|
||||
original container name.
|
||||
{% endraw %}
|
||||
|
||||
For advanced usage, the generated tag's use [go
|
||||
templates](http://golang.org/pkg/text/template/) and the container's [logging
|
||||
|
|
@ -54,14 +49,14 @@ context](https://github.com/docker/docker/blob/master/daemon/logger/context.go).
|
|||
|
||||
As an example of what is possible with the syslog logger:
|
||||
|
||||
```{% raw %}
|
||||
```
|
||||
$ docker run -it --rm \
|
||||
--log-driver syslog \
|
||||
--log-opt tag="{{ (.ExtraAttributes nil).SOME_ENV_VAR }}" \
|
||||
--log-opt env=SOME_ENV_VAR \
|
||||
-e SOME_ENV_VAR=logtester.1234 \
|
||||
flyinprogrammer/logtester
|
||||
{% endraw %}```
|
||||
```
|
||||
|
||||
Results in logs like this:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/overview/
|
||||
description: Configure logging driver.
|
||||
keywords:
|
||||
- docker, logging, driver, Fluentd
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
weight: -99
|
||||
title: Configuring Logging Drivers
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/overview/"]
|
||||
title = "Configuring Logging Drivers"
|
||||
description = "Configure logging driver."
|
||||
keywords = ["docker, logging, driver, Fluentd"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
weight=-99
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Configure logging drivers
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ compresses each log message. The accepted values are `gzip`, `zlib` and `none`.
|
|||
`gzip` is chosen by default.
|
||||
|
||||
The `gelf-compression-level` option can be used to change the level of
|
||||
compression when `gzip` or `zlib` is selected as `gelf-compression-type`.
|
||||
compresssion when `gzip` or `zlib` is selected as `gelf-compression-type`.
|
||||
Accepted value must be from from -1 to 9 (BestCompression). Higher levels
|
||||
typically run slower but compress more. Default value is 1 (BestSpeed).
|
||||
|
||||
|
|
@ -243,13 +243,13 @@ logging driver options.
|
|||
|
||||
For example, to specify both additional options:
|
||||
|
||||
```bash{% raw %}
|
||||
```bash
|
||||
$ docker run -dit \
|
||||
--log-driver=fluentd \
|
||||
--log-opt fluentd-address=localhost:24224 \
|
||||
--log-opt tag="docker.{{.Name}}" \
|
||||
alpine sh
|
||||
{% endraw %}```
|
||||
```
|
||||
|
||||
If container cannot connect to the Fluentd daemon on the specified address and
|
||||
`fluentd-async-connect` is not enabled, the container stops immediately.
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/reference/logging/splunk/
|
||||
description: Describes how to use the Splunk logging driver.
|
||||
keywords:
|
||||
- splunk, docker, logging, driver
|
||||
menu:
|
||||
main:
|
||||
parent: smn_logging
|
||||
title: Splunk logging driver
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/reference/logging/splunk/"]
|
||||
title = "Splunk logging driver"
|
||||
description = "Describes how to use the Splunk logging driver."
|
||||
keywords = ["splunk, docker, logging, driver"]
|
||||
[menu.main]
|
||||
parent = "smn_logging"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Splunk logging driver
|
||||
|
||||
|
|
@ -33,21 +32,23 @@ You can set the logging driver for a specific container by using the
|
|||
You can use the `--log-opt NAME=VALUE` flag to specify these additional Splunk
|
||||
logging driver options:
|
||||
|
||||
{% raw %}
|
||||
| Option | Required | Description |
|
||||
|-----------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `splunk-token` | required | Splunk HTTP Event Collector token. |
|
||||
| `splunk-url` | required | Path to your Splunk Enterprise or Splunk Cloud instance (including port and scheme used by HTTP Event Collector) `https://your_splunk_instance:8088`. |
|
||||
| `splunk-source` | optional | Event source. |
|
||||
| `splunk-sourcetype` | optional | Event source type. |
|
||||
| `splunk-index` | optional | Event index. |
|
||||
| `splunk-capath` | optional | Path to root certificate. |
|
||||
| `splunk-caname` | optional | Name to use for validating server certificate; by default the hostname of the `splunk-url` will be used. |
|
||||
| `splunk-insecureskipverify` | optional | Ignore server certificate validation. |
|
||||
| `tag` | optional | Specify tag for message, which interpret some markup. Default value is `{{.ID}}` (12 characters of the container ID). Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. |
|
||||
| `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for container. |
|
||||
| `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for container. |
|
||||
{% endraw %}
|
||||
| Option | Required | Description |
|
||||
|-----------------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `splunk-token` | required | Splunk HTTP Event Collector token. |
|
||||
| `splunk-url` | required | Path to your Splunk Enterprise or Splunk Cloud instance (including port and scheme used by HTTP Event Collector) `https://your_splunk_instance:8088`. |
|
||||
| `splunk-source` | optional | Event source. |
|
||||
| `splunk-sourcetype` | optional | Event source type. |
|
||||
| `splunk-index` | optional | Event index. |
|
||||
| `splunk-capath` | optional | Path to root certificate. |
|
||||
| `splunk-caname` | optional | Name to use for validating server certificate; by default the hostname of the `splunk-url` will be used. |
|
||||
| `splunk-insecureskipverify` | optional | Ignore server certificate validation. |
|
||||
| `splunk-format` | optional | Message format. Can be `inline`, `json` or `raw`. Defaults to `inline`. |
|
||||
| `splunk-verify-connection` | optional | Verify on start, that docker can connect to Splunk server. Defaults to true. |
|
||||
| `splunk-gzip` | optional | Enable/disable gzip compression to send events to Splunk Enterprise or Splunk Cloud instance. Defaults to false. |
|
||||
| `splunk-gzip-level` | optional | Set compression level for gzip. Valid values are -1 (default), 0 (no compression), 1 (best speed) ... 9 (best compression). Defaults to [DefaultCompression](https://golang.org/pkg/compress/gzip/#DefaultCompression). |
|
||||
| `tag` | optional | Specify tag for message, which interpret some markup. Default value is `{{.ID}}` (12 characters of the container ID). Refer to the [log tag option documentation](log_tags.md) for customizing the log tag format. |
|
||||
| `labels` | optional | Comma-separated list of keys of labels, which should be included in message, if these labels are specified for container. |
|
||||
| `env` | optional | Comma-separated list of keys of environment variables, which should be included in message, if these variables are specified for container. |
|
||||
|
||||
If there is collision between `label` and `env` keys, the value of the `env` takes precedence.
|
||||
Both options add additional fields to the attributes of a logging message.
|
||||
|
|
@ -58,7 +59,6 @@ Docker daemon is running. The path to the root certificate and Common Name is
|
|||
specified using an HTTPS scheme. This is used for verification.
|
||||
The `SplunkServerDefaultCert` is automatically generated by Splunk certificates.
|
||||
|
||||
{% raw %}
|
||||
docker run --log-driver=splunk \
|
||||
--log-opt splunk-token=176FCEBF-4CF5-4EDF-91BC-703796522D20 \
|
||||
--log-opt splunk-url=https://splunkhost:8088 \
|
||||
|
|
@ -70,4 +70,78 @@ The `SplunkServerDefaultCert` is automatically generated by Splunk certificates.
|
|||
--env "TEST=false"
|
||||
--label location=west
|
||||
your/application
|
||||
{% endraw %}
|
||||
|
||||
### Message formats
|
||||
|
||||
By default Logging Driver sends messages as `inline` format, where each message
|
||||
will be embedded as a string, for example
|
||||
|
||||
```
|
||||
{
|
||||
"attrs": {
|
||||
"env1": "val1",
|
||||
"label1": "label1"
|
||||
},
|
||||
"tag": "MyImage/MyContainer",
|
||||
"source": "stdout",
|
||||
"line": "my message"
|
||||
}
|
||||
{
|
||||
"attrs": {
|
||||
"env1": "val1",
|
||||
"label1": "label1"
|
||||
},
|
||||
"tag": "MyImage/MyContainer",
|
||||
"source": "stdout",
|
||||
"line": "{\"foo\": \"bar\"}"
|
||||
}
|
||||
```
|
||||
|
||||
In case if your messages are JSON objects you may want to embed them in the
|
||||
message we send to Splunk. By specifying `--log-opt splunk-format=json` driver
|
||||
will try to parse every line as a JSON object and send it as embedded object. In
|
||||
case if it cannot parse it - message will be send as `inline`. For example
|
||||
|
||||
|
||||
```
|
||||
{
|
||||
"attrs": {
|
||||
"env1": "val1",
|
||||
"label1": "label1"
|
||||
},
|
||||
"tag": "MyImage/MyContainer",
|
||||
"source": "stdout",
|
||||
"line": "my message"
|
||||
}
|
||||
{
|
||||
"attrs": {
|
||||
"env1": "val1",
|
||||
"label1": "label1"
|
||||
},
|
||||
"tag": "MyImage/MyContainer",
|
||||
"source": "stdout",
|
||||
"line": {
|
||||
"foo": "bar"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Third format is a `raw` message. You can specify it by using
|
||||
`--log-opt splunk-format=raw`. Attributes (environment variables and labels) and
|
||||
tag will be prefixed to the message. For example
|
||||
|
||||
```
|
||||
MyImage/MyContainer env1=val1 label1=label1 my message
|
||||
MyImage/MyContainer env1=val1 label1=label1 {"foo": "bar"}
|
||||
```
|
||||
|
||||
## Advanced options
|
||||
|
||||
Splunk Logging Driver allows you to configure few advanced options by specifying next environment variables for the Docker daemon.
|
||||
|
||||
| Environment variable name | Default value | Description |
|
||||
|--------------------------------------------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `SPLUNK_LOGGING_DRIVER_POST_MESSAGES_FREQUENCY` | `5s` | If there is nothing to batch how often driver will post messages. You can think about this as the maximum time to wait for more messages to batch. |
|
||||
| `SPLUNK_LOGGING_DRIVER_POST_MESSAGES_BATCH_SIZE` | `1000` | How many messages driver should wait before sending them in one batch. |
|
||||
| `SPLUNK_LOGGING_DRIVER_BUFFER_MAX` | `10 * 1000` | If driver cannot connect to remote server, what is the maximum amount of messages it can hold in buffer for retries. |
|
||||
| `SPLUNK_LOGGING_DRIVER_CHANNEL_SIZE` | `4 * 1000` | How many pending messages can be in the channel which is used to send messages to background logger worker, which batches them. |
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
description: Administer Docker
|
||||
keywords:
|
||||
- Administer
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_admin
|
||||
parent: engine_use
|
||||
weight: "-70"
|
||||
title: Admin Guide
|
||||
type: menu
|
||||
---
|
||||
<!-- [metadata]>
|
||||
+++
|
||||
title = "Admin Guide"
|
||||
description = "Administer Docker"
|
||||
keywords = ["Administer"]
|
||||
type="menu"
|
||||
[menu.main]
|
||||
parent="engine_use"
|
||||
identifier="engine_admin"
|
||||
weight="-70"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Admin Topics
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/puppet/
|
||||
description: Installing and using Puppet
|
||||
keywords:
|
||||
- puppet, installation, usage, docker, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "12"
|
||||
title: Using Puppet
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/puppet/"]
|
||||
title = "Using Puppet"
|
||||
description = "Installing and using Puppet"
|
||||
keywords = ["puppet, installation, usage, docker, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="12"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Puppet
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/registry_mirror/
|
||||
description: How to set up and run a local registry mirror
|
||||
keywords:
|
||||
- docker, registry, mirror, examples
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: 8
|
||||
title: Run a local registry mirror
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/registry_mirror/"]
|
||||
title = "Run a local registry mirror"
|
||||
description = "How to set up and run a local registry mirror"
|
||||
keywords = ["docker, registry, mirror, examples"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight = 8
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Run a local registry mirror
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/run_metrics
|
||||
- /engine/articles/runmetrics
|
||||
description: Measure the behavior of running containers
|
||||
keywords:
|
||||
- docker, metrics, CPU, memory, disk, IO, run, runtime, stats
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: 14
|
||||
title: Runtime metrics
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/run_metrics"]
|
||||
title = "Runtime metrics"
|
||||
description = "Measure the behavior of running containers"
|
||||
keywords = ["docker, metrics, CPU, memory, disk, IO, run, runtime, stats"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight = 14
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Runtime metrics
|
||||
|
||||
|
|
@ -67,8 +65,8 @@ known to the system, the hierarchy they belong to, and how many groups they cont
|
|||
|
||||
You can also look at `/proc/<pid>/cgroup` to see which control groups a process
|
||||
belongs to. The control group will be shown as a path relative to the root of
|
||||
the hierarchy mountpoint; e.g., `/` means “this process has not been assigned into
|
||||
a particular group”, while `/lxc/pumpkin` means that the process is likely to be
|
||||
the hierarchy mountpoint; e.g., `/` means "this process has not been assigned into
|
||||
a particular group", while `/lxc/pumpkin` means that the process is likely to be
|
||||
a member of a container named `pumpkin`.
|
||||
|
||||
## Finding the cgroup for a given container
|
||||
|
|
@ -281,7 +279,7 @@ program (present in the host system) within any network namespace
|
|||
visible to the current process. This means that your host will be able
|
||||
to enter the network namespace of your containers, but your containers
|
||||
won't be able to access the host, nor their sibling containers.
|
||||
Containers will be able to “see” and affect their sub-containers,
|
||||
Containers will be able to "see" and affect their sub-containers,
|
||||
though.
|
||||
|
||||
The exact format of the command is:
|
||||
|
|
@ -315,7 +313,7 @@ container, we need to:
|
|||
- Create a symlink from `/var/run/netns/<somename>` to `/proc/<thepid>/ns/net`
|
||||
- Execute `ip netns exec <somename> ....`
|
||||
|
||||
Please review [Enumerating Cgroups](runmetrics.md#enumerating-cgroups) to learn how to find
|
||||
Please review [Enumerating Cgroups](#enumerating-cgroups) to learn how to find
|
||||
the cgroup of a process running in the container of which you want to
|
||||
measure network usage. From there, you can examine the pseudo-file named
|
||||
`tasks`, which contains the PIDs that are in the
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/systemd/
|
||||
description: Controlling and configuring Docker using systemd
|
||||
keywords:
|
||||
- docker, daemon, systemd, configuration
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "7"
|
||||
title: Control and configure Docker with systemd
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/systemd/"]
|
||||
title = "Control and configure Docker with systemd"
|
||||
description = "Controlling and configuring Docker using systemd"
|
||||
keywords = ["docker, daemon, systemd, configuration"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="7"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Control and configure Docker with systemd
|
||||
|
||||
|
|
@ -73,7 +72,7 @@ Alternatively, find out where the service file is located:
|
|||
EnvironmentFile=-/etc/sysconfig/docker
|
||||
|
||||
You can customize the Docker daemon options using override files as explained in the
|
||||
[HTTP Proxy example](systemd.md#http-proxy) below. The files located in `/usr/lib/systemd/system`
|
||||
[HTTP Proxy example](#http-proxy) below. The files located in `/usr/lib/systemd/system`
|
||||
or `/lib/systemd/system` contain the default options and should not be edited.
|
||||
|
||||
### Runtime directory and storage driver
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/articles/using_supervisord/
|
||||
description: How to use Supervisor process management with Docker
|
||||
keywords:
|
||||
- docker, supervisor, process management
|
||||
menu:
|
||||
main:
|
||||
parent: engine_admin
|
||||
weight: "13"
|
||||
title: Using Supervisor with Docker
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/articles/using_supervisord/"]
|
||||
title = "Using Supervisor with Docker"
|
||||
description = "How to use Supervisor process management with Docker"
|
||||
keywords = ["docker, supervisor, process management"]
|
||||
[menu.main]
|
||||
parent = "engine_admin"
|
||||
weight="13"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Using Supervisor with Docker
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/misc/breaking/
|
||||
description: Breaking changes
|
||||
keywords:
|
||||
- docker, documentation, about, technology, breaking
|
||||
- incompatibilities
|
||||
menu:
|
||||
main:
|
||||
parent: engine_use
|
||||
weight: 80
|
||||
title: Breaking changes
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/misc/breaking/"]
|
||||
title = "Breaking changes"
|
||||
description = "Breaking changes"
|
||||
keywords = ["docker, documentation, about, technology, breaking",
|
||||
"incompatibilities"]
|
||||
[menu.main]
|
||||
parent = "engine_use"
|
||||
weight=80
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Breaking changes and incompatibilities
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/misc/deprecated/
|
||||
description: Deprecated Features.
|
||||
keywords:
|
||||
- docker, documentation, about, technology, deprecate
|
||||
menu:
|
||||
main:
|
||||
parent: engine_use
|
||||
weight: 80
|
||||
title: Deprecated Engine Features
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/misc/deprecated/"]
|
||||
title = "Deprecated Engine Features"
|
||||
description = "Deprecated Features."
|
||||
keywords = ["docker, documentation, about, technology, deprecate"]
|
||||
[menu.main]
|
||||
parent = "engine_use"
|
||||
weight=80
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Deprecated Engine Features
|
||||
|
||||
|
|
@ -18,6 +17,13 @@ To learn more about Docker Engine's deprecation policy,
|
|||
see [Feature Deprecation Policy](index.md#feature-deprecation-policy).
|
||||
|
||||
|
||||
### `docker daemon` subcommand
|
||||
**Deprecated In Release: [v1.13](https://github.com/docker/docker/releases/)**
|
||||
|
||||
**Target For Removal In Release: v1.16**
|
||||
|
||||
The daemon is moved to a separate binary (`dockerd`), and should be used instead.
|
||||
|
||||
### Three argument form in `docker import`
|
||||
**Deprecated In Release: [v0.6.7](https://github.com/docker/docker/releases/tag/v0.6.7)**
|
||||
|
||||
|
|
@ -106,9 +112,7 @@ Log tags are now generated in a standard way across different logging drivers.
|
|||
Because of which, the driver specific log tag options `syslog-tag`, `gelf-tag` and
|
||||
`fluentd-tag` have been deprecated in favor of the generic `tag` option.
|
||||
|
||||
{% raw %}
|
||||
docker --log-driver=syslog --log-opt tag="{{.ImageName}}/{{.Name}}/{{.ID}}"
|
||||
{% endraw %}
|
||||
|
||||
### LXC built-in exec driver
|
||||
**Deprecated In Release: [v1.8.0](https://github.com/docker/docker/releases/tag/v1.8.0)**
|
||||
|
|
@ -175,6 +179,15 @@ The single-dash (`-help`) was removed, in favor of the double-dash `--help`
|
|||
docker -help
|
||||
docker [COMMAND] -help
|
||||
|
||||
### `--run` flag on docker commit
|
||||
|
||||
**Deprecated In Release: [v0.10.0](https://github.com/docker/docker/releases/tag/v0.10.0)**
|
||||
|
||||
**Removed In Release: [v1.13.0](https://github.com/docker/docker/releases/)**
|
||||
|
||||
The flag `--run` of the docker commit (and its short version `-run`) were deprecated in favor
|
||||
of the `--changes` flag that allows to pass `Dockerfile` commands.
|
||||
|
||||
|
||||
### Interacting with V1 registries
|
||||
|
||||
|
|
@ -189,3 +202,8 @@ Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the
|
|||
|
||||
- DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE is now named DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE
|
||||
- DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE is now named DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE
|
||||
|
||||
### `MAINTAINER` in Dockerfile
|
||||
**Deprecated In Release: v1.13.0**
|
||||
|
||||
`MAINTAINER` was an early very limited form of `LABEL` which should be used instead.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Installing and running an apt-cacher-ng service
|
||||
keywords:
|
||||
- docker, example, package installation, networking, debian, ubuntu
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing an apt-cacher-ng service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing an apt-cacher-ng service"
|
||||
description = "Installing and running an apt-cacher-ng service"
|
||||
keywords = ["docker, example, package installation, networking, debian, ubuntu"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing an apt-cacher-ng service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Dockerizing a Couchbase service
|
||||
keywords:
|
||||
- docker, example, package installation, networking, couchbase
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing a Couchbase service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing a Couchbase service"
|
||||
description = "Dockerizing a Couchbase service"
|
||||
keywords = ["docker, example, package installation, networking, couchbase"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing a Couchbase service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Sharing data between 2 couchdb databases
|
||||
keywords:
|
||||
- docker, example, package installation, networking, couchdb, data volumes
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing a CouchDB service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing a CouchDB service"
|
||||
description = "Sharing data between 2 couchdb databases"
|
||||
keywords = ["docker, example, package installation, networking, couchdb, data volumes"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing a CouchDB service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
description: Provides examples for using Docker
|
||||
keywords:
|
||||
- dockerize, dockerizing apps, dockerizing applications, container, containers
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_dockerize
|
||||
parent: engine_use
|
||||
weight: 8
|
||||
title: Dockerize an application
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerize an application"
|
||||
description = "Provides examples for using Docker"
|
||||
keywords = ["dockerize, dockerizing apps, dockerizing applications, container, containers"]
|
||||
[menu.main]
|
||||
identifier = "engine_dockerize"
|
||||
parent="engine_use"
|
||||
weight = 8
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerize an application
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
---
|
||||
description: Creating a Docker image with MongoDB pre-installed using a Dockerfile
|
||||
and sharing the image on Docker Hub
|
||||
keywords:
|
||||
- docker, dockerize, dockerizing, article, example, docker.io, platform, package,
|
||||
installation, networking, mongodb, containers, images, image, sharing, dockerfile,
|
||||
build, auto-building, framework
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing MongoDB
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing MongoDB"
|
||||
description = "Creating a Docker image with MongoDB pre-installed using a Dockerfile and sharing the image on Docker Hub"
|
||||
keywords = ["docker, dockerize, dockerizing, article, example, docker.io, platform, package, installation, networking, mongodb, containers, images, image, sharing, dockerfile, build, auto-building, framework"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing MongoDB
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
{}
|
||||
---
|
||||
|
||||
# Dockerizing MongoDB: Dockerfile for building MongoDB images
|
||||
# Based on ubuntu:16.04, installs MongoDB following the instructions from:
|
||||
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Running and installing a PostgreSQL service
|
||||
keywords:
|
||||
- docker, example, package installation, postgresql
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing PostgreSQL
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing PostgreSQL"
|
||||
description = "Running and installing a PostgreSQL service"
|
||||
keywords = ["docker, example, package installation, postgresql"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing PostgreSQL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Installing and running a redis service
|
||||
keywords:
|
||||
- docker, example, package installation, networking, redis
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing a Redis service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing a Redis service"
|
||||
description = "Installing and running a redis service"
|
||||
keywords = ["docker, example, package installation, networking, redis"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing a Redis service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Build a Docker image with Riak pre-installed
|
||||
keywords:
|
||||
- docker, example, package installation, networking, riak
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing a Riak service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing a Riak service"
|
||||
description = "Build a Docker image with Riak pre-installed"
|
||||
keywords = ["docker, example, package installation, networking, riak"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing a Riak service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: Installing and running an SSHd service on Docker
|
||||
keywords:
|
||||
- docker, example, package installation, networking
|
||||
menu:
|
||||
main:
|
||||
parent: engine_dockerize
|
||||
title: Dockerizing an SSH service
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerizing an SSH service"
|
||||
description = "Installing and running an SSHd service on Docker"
|
||||
keywords = ["docker, example, package installation, networking"]
|
||||
[menu.main]
|
||||
parent = "engine_dockerize"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerizing an SSH daemon service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
---
|
||||
advisory: experimental
|
||||
aliases:
|
||||
- /engine/extend/
|
||||
description: How develop and use a plugin with the managed plugin system
|
||||
keywords:
|
||||
- API, Usage, plugins, documentation, developer
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 1
|
||||
title: Managed plugin system
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/extend/"
|
||||
]
|
||||
title = "Managed plugin system"
|
||||
description = "How develop and use a plugin with the managed plugin system"
|
||||
keywords = ["API, Usage, plugins, documentation, developer"]
|
||||
advisory = "experimental"
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Engine managed plugin system
|
||||
|
||||
This document describes the plugin system available today in the **experimental
|
||||
build** of Docker 1.12:
|
||||
|
||||
* [How to operate an existing plugin](index.md#how-to-operate-a-plugin)
|
||||
* [How to develop a plugin](index.md#how-to-develop-a-plugin)
|
||||
* [How to operate an existing plugin](#how-to-operate-a-plugin)
|
||||
* [How to develop a plugin](#how-to-develop-a-plugin)
|
||||
|
||||
Unlike the legacy plugin system, you now manage plugins using Docker Engine:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
aliases: /engine/extend/plugins/
|
||||
description: How to add additional functionality to Docker with plugins extensions
|
||||
keywords:
|
||||
- Examples, Usage, plugins, docker, documentation, user guide
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 3
|
||||
title: Use Docker Engine plugins
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = "/engine/extend/plugins/"
|
||||
title = "Use Docker Engine plugins"
|
||||
description = "How to add additional functionality to Docker with plugins extensions"
|
||||
keywords = ["Examples, Usage, plugins, docker, documentation, user guide"]
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Use Docker Engine plugins
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
advisory: experimental
|
||||
aliases:
|
||||
- /engine/extend/
|
||||
description: How develop and use a plugin with the managed plugin system
|
||||
keywords:
|
||||
- API, Usage, plugins, documentation, developer
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 1
|
||||
title: Plugin manifest
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/extend/"
|
||||
]
|
||||
title = "Plugin manifest"
|
||||
description = "How develop and use a plugin with the managed plugin system"
|
||||
keywords = ["API, Usage, plugins, documentation, developer"]
|
||||
advisory = "experimental"
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Plugin Manifest Version 0 of Plugin V2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
description: Develop plugins and use existing plugins for Docker Engine
|
||||
keywords:
|
||||
- extend, plugins, docker, documentation, developer
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_extend
|
||||
parent: engine_use
|
||||
weight: 0
|
||||
title: Implement plugins
|
||||
type: menu
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Implement plugins"
|
||||
description = "Develop plugins and use existing plugins for Docker Engine"
|
||||
keywords = ["extend, plugins, docker, documentation, developer"]
|
||||
type="menu"
|
||||
[menu.main]
|
||||
identifier = "engine_extend"
|
||||
parent="engine_use"
|
||||
weight = 0
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
<!--menu page not rendered-->
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /extend/plugin_api/
|
||||
description: 'How to write Docker plugins extensions '
|
||||
keywords:
|
||||
- API, Usage, plugins, documentation, developer
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 7
|
||||
title: Plugins API
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Plugins API"
|
||||
description = "How to write Docker plugins extensions "
|
||||
keywords = ["API, Usage, plugins, documentation, developer"]
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=7
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Plugin API
|
||||
|
||||
|
|
@ -28,7 +26,7 @@ If you just want to learn about or use Docker plugins, look
|
|||
|
||||
A plugin is a process running on the same or a different host as the docker daemon,
|
||||
which registers itself by placing a file on the same docker host in one of the plugin
|
||||
directories described in [Plugin discovery](plugin_api.md#plugin-discovery).
|
||||
directories described in [Plugin discovery](#plugin-discovery).
|
||||
|
||||
Plugins have human-readable names, which are short, lowercase strings. For
|
||||
example, `flocker` or `weave`.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/extend/authorization/
|
||||
description: How to create authorization plugins to manage access control to your
|
||||
Docker daemon.
|
||||
keywords:
|
||||
- security, authorization, authentication, docker, documentation, plugin, extend
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 4
|
||||
title: Access authorization plugin
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Access authorization plugin"
|
||||
description = "How to create authorization plugins to manage access control to your Docker daemon."
|
||||
keywords = ["security, authorization, authentication, docker, documentation, plugin, extend"]
|
||||
aliases = ["/engine/extend/authorization/"]
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight = 4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Create an authorization plugin
|
||||
|
||||
|
|
@ -109,6 +108,8 @@ support the Docker client interactions detailed in this section.
|
|||
Enable the authorization plugin with a dedicated command line flag in the
|
||||
`--authorization-plugin=PLUGIN_ID` format. The flag supplies a `PLUGIN_ID`
|
||||
value. This value can be the plugin’s socket or a path to a specification file.
|
||||
Authorization plugins can be loaded without restarting the daemon. Refer
|
||||
to the [`dockerd` documentation](../reference/commandline/dockerd.md#configuration-reloading) for more information.
|
||||
|
||||
```bash
|
||||
$ dockerd --authorization-plugin=plugin1 --authorization-plugin=plugin2,...
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: Network driver plugins.
|
||||
keywords:
|
||||
- Examples, Usage, plugins, docker, documentation, user guide
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 5
|
||||
title: Docker network driver plugins
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker network driver plugins"
|
||||
description = "Network driver plugins."
|
||||
keywords = ["Examples, Usage, plugins, docker, documentation, user guide"]
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Engine network driver plugins
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: How to manage data with external volume plugins
|
||||
keywords:
|
||||
- Examples, Usage, volume, docker, data, volumes, plugin, api
|
||||
menu:
|
||||
main:
|
||||
parent: engine_extend
|
||||
weight: 6
|
||||
title: Volume plugins
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Volume plugins"
|
||||
description = "How to manage data with external volume plugins"
|
||||
keywords = ["Examples, Usage, volume, docker, data, volumes, plugin, api"]
|
||||
[menu.main]
|
||||
parent = "engine_extend"
|
||||
weight=6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Write a volume plugin
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/misc/faq/
|
||||
description: Most frequently asked questions.
|
||||
keywords:
|
||||
- faq, questions, documentation, docker
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_faq
|
||||
parent: engine_use
|
||||
weight: 80
|
||||
title: FAQ
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/misc/faq/"]
|
||||
title = "FAQ"
|
||||
description = "Most frequently asked questions."
|
||||
keywords = ["faq, questions, documentation, docker"]
|
||||
[menu.main]
|
||||
identifier="engine_faq"
|
||||
parent = "engine_use"
|
||||
weight = 80
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Frequently Asked Questions (FAQ)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/started/
|
||||
- /windows/started/
|
||||
- /linux/started/
|
||||
- /getting-started/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_all
|
||||
parent: tutorial_getstart_menu
|
||||
weight: "-1"
|
||||
title: Get Started with Docker
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/started/",
|
||||
"/windows/started/",
|
||||
"/linux/started/",
|
||||
"/getting-started/"
|
||||
]
|
||||
title = "Get Started with Docker"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_all"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight="-1"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Get Started with Docker
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/last_page/
|
||||
- /windows/last_page/
|
||||
- /linux/last_page/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_learn_more
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 7
|
||||
title: Learning more
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/last_page/",
|
||||
"/windows/last_page/",
|
||||
"/linux/last_page/",
|
||||
]
|
||||
title = "Learning more"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_learn_more"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 7
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Learning more
|
||||
|
||||
|
|
@ -29,23 +30,23 @@ Depending on your interest, the Docker documentation contains a wealth of inform
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">More about Docker for Mac, features, examples, FAQs, relationship to Docker Machine and Docker Toolbox, and how this fits in the Docker ecosystem</td>
|
||||
<td class="tg-031e"><a href="/docker-for-mac/">Getting Started with Docker for Mac</a></td>
|
||||
<td class="tg-031e">[Getting Started with Docker for Mac](https://docs.docker.com/docker-for-mac/)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">More about Docker for Windows, features, examples, FAQs, relationship to Docker Machine and Docker Toolbox, and how this fits in the Docker ecosystem</td>
|
||||
<td class="tg-031e"><a href="/docker-for-windows/">Getting Started with Docker for Windows</a></td>
|
||||
<td class="tg-031e">[Getting Started with Docker for Windows](https://docs.docker.com/docker-for-windows/)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">More about Docker Toolbox</td>
|
||||
<td class="tg-031e"><a href="/toolbox/overview/">Docker Toolbox Overview</a></td>
|
||||
<td class="tg-031e">[Docker Toolbox Overview](/toolbox/overview.md)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">More about Docker for Linux distributions</td>
|
||||
<td class="tg-031e"><a href="/engine/installation/linux/">Install Docker Engine on Linux</a></td>
|
||||
<td class="tg-031e">[Install Docker Engine on Linux](/engine/installation/linux/index.md)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">More advanced tutorials on running containers, building your own images, networking containers, managing data for containers, and storing images on Docker Hub</td>
|
||||
<td class="tg-031e"><a href="/engine/tutorials/">Learn by example</a></td>
|
||||
<td class="tg-031e"> [Learn by example](/engine/tutorials/index.md)</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">Information about the Docker product line</td>
|
||||
|
|
@ -54,10 +55,16 @@ Depending on your interest, the Docker documentation contains a wealth of inform
|
|||
|
||||
<tr>
|
||||
<td class="tg-031e">How to set up an automated build on Docker Hub</td>
|
||||
<td class="tg-031e"><a href="/docker-hub/">Docker Hub documentation</a></td>
|
||||
<td class="tg-031e"><a href="https://docs.docker.com/docker-hub/">Docker Hub documentation</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tg-031e">How to run a multi-container application with Compose</td>
|
||||
<td class="tg-031e"><a href="/compose/">Docker Compose documentation</a></td>
|
||||
<td class="tg-031e"> [Docker Compose documentation](/compose/overview.md)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/started/
|
||||
description: Getting started with Docker
|
||||
identifier: getstart_linux_install
|
||||
keywords:
|
||||
- beginner, getting started, Docker, install
|
||||
parent: tutorial_getstart_menu
|
||||
title: Install Docker and run hello-world
|
||||
weight: "-80"
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/mac/started/"]
|
||||
title = "Install Docker and run hello-world"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker, install"]
|
||||
identifier = "getstart_linux_install"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight="-80"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Example: Install Docker on Ubuntu Linux
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
aliases: []
|
||||
description: Docker Mac
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: tutorial_getstart_menu
|
||||
parent: engine_use
|
||||
weight: -80
|
||||
title: Get Started with Docker
|
||||
type: menu
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
]
|
||||
title = "Get Started with Docker"
|
||||
description = "Docker Mac"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
type = "menu"
|
||||
[menu.main]
|
||||
identifier = "tutorial_getstart_menu"
|
||||
parent = "engine_use"
|
||||
weight = -80
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Get Started with Docker
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_five/
|
||||
- /windows/step_five/
|
||||
- /linux/step_five/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_docker_hub
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 5
|
||||
title: Create a Docker Hub account & repository
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_five/",
|
||||
"/windows/step_five/",
|
||||
"/linux/step_five/",
|
||||
]
|
||||
title = "Create a Docker Hub account & repository"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_docker_hub"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Create a Docker Hub account & repository
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_four/
|
||||
- /windows/step_four/
|
||||
- /linux/step_four/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_build_image
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 4
|
||||
title: Build your own image
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_four/",
|
||||
"/windows/step_four/",
|
||||
"/linux/step_four/",
|
||||
]
|
||||
title = "Build your own image"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_build_image"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Build your own image
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_one/
|
||||
- /windows/step_one/
|
||||
- /linux/step_one/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker, install
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_all_install
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 1
|
||||
title: Install Docker and run hello-world
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_one/",
|
||||
"/windows/step_one/",
|
||||
"/linux/step_one/",
|
||||
]
|
||||
title = "Install Docker and run hello-world"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker, install"]
|
||||
[menu.main]
|
||||
identifier = "getstart_all_install"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Docker
|
||||
|
||||
- [Step 1: Get Docker](step_one.md#step-1-get-docker)
|
||||
- [Step 2: Install Docker](step_one.md#step-2-install-docker)
|
||||
- [Step 3: Verify your installation](step_one.md#step-3-verify-your-installation)
|
||||
- [Step 1: Get Docker](#step-1-get-docker)
|
||||
- [Step 2: Install Docker](#step-2-install-docker)
|
||||
- [Step 3: Verify your installation](#step-3-verify-your-installation)
|
||||
|
||||
## Step 1: Get Docker
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_six/
|
||||
- /windows/step_six/
|
||||
- /linux/step_six/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_tag_push_pull
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 6
|
||||
title: Tag, push, & pull your image
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_six/",
|
||||
"/windows/step_six/",
|
||||
"/linux/step_six/",
|
||||
]
|
||||
title = "Tag, push, & pull your image"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_tag_push_pull"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Tag, push, and pull your image
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_three/
|
||||
- /windows/step_three/
|
||||
- /linux/step_three/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_locate
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 3
|
||||
title: Find & run the whalesay image
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_three/",
|
||||
"/windows/step_three/",
|
||||
"/linux/step_three/",
|
||||
]
|
||||
title = "Find & run the whalesay image"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_locate"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Find and run the whalesay image
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ image you'll use in the rest of this getting started.
|
|||
|
||||
## Step 1: Locate the whalesay image
|
||||
|
||||
1. Open your browser and [browse to the Docker Hub](https://hub.docker.com/?utm_source=getting_started_guide&utm_medium=embedded_MacOSX&utm_campaign=find_whalesay).
|
||||
1. Open your browser and <a href="https://hub.docker.com/?utm_source=getting_started_guide&utm_medium=embedded_MacOSX&utm_campaign=find_whalesay" target=_blank> browse to the Docker Hub</a>.
|
||||
|
||||

|
||||
|
||||
|
|
@ -78,15 +79,15 @@ Make sure Docker is running. On Docker for Mac and Docker for Windows, this is i
|
|||
-----
|
||||
\
|
||||
\
|
||||
\
|
||||
## .
|
||||
## ## ## ==
|
||||
## ## ## ## ===
|
||||
/""""""""""""""""___/ ===
|
||||
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
|
||||
\______ o __/
|
||||
\ \ __/
|
||||
\____\______/
|
||||
\
|
||||
## .
|
||||
## ## ## ==
|
||||
## ## ## ## ===
|
||||
/""""""""""""""""___/ ===
|
||||
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
|
||||
\______ o __/
|
||||
\ \ __/
|
||||
\____\______/
|
||||
|
||||
The first time you run a software image, the `docker` command looks for it
|
||||
on your local system. If the image isn't there, then `docker` gets it from
|
||||
|
|
@ -120,15 +121,15 @@ Make sure Docker is running. On Docker for Mac and Docker for Windows, this is i
|
|||
---------
|
||||
\
|
||||
\
|
||||
\
|
||||
## .
|
||||
## ## ## ==
|
||||
## ## ## ## ===
|
||||
/""""""""""""""""___/ ===
|
||||
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
|
||||
\______ o __/
|
||||
\ \ __/
|
||||
\____\______/
|
||||
\
|
||||
## .
|
||||
## ## ## ==
|
||||
## ## ## ## ===
|
||||
/""""""""""""""""___/ ===
|
||||
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
|
||||
\______ o __/
|
||||
\ \ __/
|
||||
\____\______/
|
||||
|
||||
## Where to go next
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,19 @@
|
|||
---
|
||||
aliases:
|
||||
- /mac/step_two/
|
||||
- /windows/step_two/
|
||||
- /linux/step_two/
|
||||
description: Getting started with Docker
|
||||
keywords:
|
||||
- beginner, getting started, Docker
|
||||
menu:
|
||||
main:
|
||||
identifier: getstart_understand
|
||||
parent: tutorial_getstart_menu
|
||||
weight: 2
|
||||
title: Understand images & containers
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/mac/step_two/",
|
||||
"/windows/step_two/",
|
||||
"/linux/step_two/",
|
||||
]
|
||||
title = "Understand images & containers"
|
||||
description = "Getting started with Docker"
|
||||
keywords = ["beginner, getting started, Docker"]
|
||||
[menu.main]
|
||||
identifier = "getstart_understand"
|
||||
parent = "tutorial_getstart_menu"
|
||||
weight = 2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Learn about images & containers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/misc/
|
||||
description: Engine
|
||||
keywords:
|
||||
- Engine
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_use
|
||||
weight: -85
|
||||
title: Docker Engine
|
||||
---
|
||||
<!-- [metadata]>
|
||||
+++
|
||||
aliases = ["/engine/misc/"]
|
||||
title = "Docker Engine"
|
||||
description = "Engine"
|
||||
keywords = ["Engine"]
|
||||
[menu.main]
|
||||
identifier="engine_use"
|
||||
weight=-85
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# About Docker Engine
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
description: Instructions for installing Docker as a binary. Mostly meant for hackers
|
||||
who want to try out Docker on a variety of environments.
|
||||
keywords:
|
||||
- binaries, installation, docker, documentation, linux
|
||||
menu:
|
||||
main:
|
||||
parent: engine_install
|
||||
weight: 110
|
||||
title: Installation from binaries
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation from binaries"
|
||||
description = "Instructions for installing Docker as a binary. Mostly meant for hackers who want to try out Docker on a variety of environments."
|
||||
keywords = ["binaries, installation, docker, documentation, linux"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight = 110
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Installation from binaries
|
||||
|
||||
|
|
@ -118,7 +117,7 @@ For example:
|
|||
|
||||
> **Note** These instructions are for Docker Engine 1.11 and up. Engine 1.10 and
|
||||
> under consists of a single binary, and instructions for those versions are
|
||||
> different. To install version 1.10 or below, follow the instructions in the
|
||||
> different. To install version 1.10 or below, follow the instructions in the
|
||||
> <a href="https://docs.docker.com/v1.10/engine/installation/binaries/" target="_blank">1.10 documentation</a>.
|
||||
|
||||
|
||||
|
|
@ -147,6 +146,9 @@ For example, to install the binaries in `/usr/bin`:
|
|||
$ mv docker/* /usr/bin/
|
||||
```
|
||||
|
||||
> **Note**: Depending on your current setup, you can specify custom paths
|
||||
> for some of the binaries provided.
|
||||
|
||||
> **Note**: If you already have Engine installed on your host, make sure you
|
||||
> stop Engine before installing (`killall docker`), and install the binaries
|
||||
> in the same location. You can find the location of the current installation
|
||||
|
|
@ -245,7 +247,7 @@ daemon:
|
|||
|
||||
$ killall docker
|
||||
|
||||
Then follow the [regular installation steps](binaries.md#get-the-linux-binaries).
|
||||
Then follow the [regular installation steps](#get-the-linux-binaries).
|
||||
|
||||
## Next steps
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
---
|
||||
description: Example of a manual install of Docker Engine on a cloud provider, using
|
||||
Amazon Web Services (AWS) EC2. Shows how to create an EC2 instance, and install
|
||||
Docker Engine on it.
|
||||
keywords:
|
||||
- cloud, docker, machine, documentation, installation, AWS, EC2
|
||||
menu:
|
||||
main:
|
||||
parent: install_cloud
|
||||
title: 'Example: Manual install on cloud provider'
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Example: Manual install on cloud provider"
|
||||
description = "Example of a manual install of Docker Engine on a cloud provider, using Amazon Web Services (AWS) EC2. Shows how to create an EC2 instance, and install Docker Engine on it."
|
||||
keywords = ["cloud, docker, machine, documentation, installation, AWS, EC2"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Example: Manual install on cloud provider
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
---
|
||||
description: Example of using Docker Machine to install Docker Engine on a cloud provider,
|
||||
using Digital Ocean.
|
||||
keywords:
|
||||
- cloud, docker, machine, documentation, installation, digitalocean
|
||||
menu:
|
||||
main:
|
||||
parent: install_cloud
|
||||
title: 'Example: Use Docker Machine to provision cloud hosts'
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Example: Use Docker Machine to provision cloud hosts"
|
||||
description = "Example of using Docker Machine to install Docker Engine on a cloud provider, using Digital Ocean."
|
||||
keywords = ["cloud, docker, machine, documentation, installation, digitalocean"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Example: Use Docker Machine to provision cloud hosts
|
||||
|
||||
|
|
@ -27,19 +26,19 @@ If you have not done so already, go to <a href="https://digitalocean.com" target
|
|||
|
||||
To generate your access token:
|
||||
|
||||
1. Go to the Digital Ocean administrator console and click **API** in the header.
|
||||
1. Go to the Digital Ocean administrator console and click **API** in the header.
|
||||
|
||||

|
||||
|
||||
2. Click **Generate New Token** to get to the token generator.
|
||||
2. Click **Generate New Token** to get to the token generator.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Give the token a clever name (e.g. "machine"), make sure the **Write (Optional)** checkbox is checked, and click **Generate Token**.
|
||||
3. Give the token a clever name (e.g. "machine"), make sure the **Write (Optional)** checkbox is checked, and click **Generate Token**.
|
||||
|
||||

|
||||
|
||||
4. Grab (copy to clipboard) the generated big long hex string and store it somewhere safe.
|
||||
4. Grab (copy to clipboard) the generated big long hex string and store it somewhere safe.
|
||||
|
||||

|
||||
|
||||
|
|
@ -57,127 +56,111 @@ To generate your access token:
|
|||
|
||||
2. At a command terminal, use `docker-machine ls` to get a list of Docker Machines and their status.
|
||||
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp:////xxx.xxx.xx.xxx:xxxx
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp:////xxx.xxx.xx.xxx:xxxx
|
||||
|
||||
6. Run some Docker commands to make sure that Docker Engine is also up-and-running.
|
||||
6. Run some Docker commands to make sure that Docker Engine is also up-and-running.
|
||||
|
||||
We'll run `docker run hello-world` again, but you could try `docker ps`, `docker run docker/whalesay cowsay boo`, or another command to verify that Docker is running.
|
||||
|
||||
```
|
||||
$ docker run hello-world
|
||||
$ docker run hello-world
|
||||
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
...
|
||||
```
|
||||
Hello from Docker.
|
||||
This message shows that your installation appears to be working correctly.
|
||||
...
|
||||
|
||||
### Step 4. Use Machine to Create the Droplet
|
||||
|
||||
1. Run `docker-machine create` with the `digitalocean` driver and pass your key to the `--digitalocean-access-token` flag, along with a name for the new cloud server.
|
||||
1. Run `docker-machine create` with the `digitalocean` driver and pass your key to the `--digitalocean-access-token` flag, along with a name for the new cloud server.
|
||||
|
||||
For this example, we'll call our new Droplet "docker-sandbox".
|
||||
|
||||
```
|
||||
$ docker-machine create --driver digitalocean --digitalocean-access-token xxxxx docker-sandbox
|
||||
Running pre-create checks...
|
||||
Creating machine...
|
||||
(docker-sandbox) OUT | Creating SSH key...
|
||||
(docker-sandbox) OUT | Creating Digital Ocean droplet...
|
||||
(docker-sandbox) OUT | Waiting for IP address to be assigned to the Droplet...
|
||||
Waiting for machine to be running, this may take a few minutes...
|
||||
Machine is running, waiting for SSH to be available...
|
||||
Detecting operating system of created instance...
|
||||
Detecting the provisioner...
|
||||
Provisioning created instance...
|
||||
Copying certs to the local machine directory...
|
||||
Copying certs to the remote machine...
|
||||
Setting Docker configuration on the remote daemon...
|
||||
To see how to connect Docker to this machine, run: docker-machine env docker-sandbox
|
||||
```
|
||||
$ docker-machine create --driver digitalocean --digitalocean-access-token xxxxx docker-sandbox
|
||||
Running pre-create checks...
|
||||
Creating machine...
|
||||
(docker-sandbox) OUT | Creating SSH key...
|
||||
(docker-sandbox) OUT | Creating Digital Ocean droplet...
|
||||
(docker-sandbox) OUT | Waiting for IP address to be assigned to the Droplet...
|
||||
Waiting for machine to be running, this may take a few minutes...
|
||||
Machine is running, waiting for SSH to be available...
|
||||
Detecting operating system of created instance...
|
||||
Detecting the provisioner...
|
||||
Provisioning created instance...
|
||||
Copying certs to the local machine directory...
|
||||
Copying certs to the remote machine...
|
||||
Setting Docker configuration on the remote daemon...
|
||||
To see how to connect Docker to this machine, run: docker-machine env docker-sandbox
|
||||
|
||||
When the Droplet is created, Docker generates a unique SSH key and stores it on your local system in `~/.docker/machines`. Initially, this is used to provision the host. Later, it's used under the hood to access the Droplet directly with the `docker-machine ssh` command. Docker Engine is installed on the cloud server and the daemon is configured to accept remote connections over TCP using TLS for authentication.
|
||||
|
||||
2. Go to the Digital Ocean console to view the new Droplet.
|
||||
2. Go to the Digital Ocean console to view the new Droplet.
|
||||
|
||||

|
||||
|
||||
3. At the command terminal, run `docker-machine ls`.
|
||||
3. At the command terminal, run `docker-machine ls`.
|
||||
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox - digitalocean Running tcp://45.55.139.48:2376
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default * virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox - digitalocean Running tcp://45.55.139.48:2376
|
||||
|
||||
Notice that the new cloud server is running but is not the active host. Our command shell is still connected to the default machine, which is currently the active host as indicated by the asterisk (*).
|
||||
|
||||
4. Run `docker-machine env docker-sandbox` to get the environment commands for the new remote host, then run `eval` as directed to re-configure the shell to connect to `docker-sandbox`.
|
||||
|
||||
```
|
||||
$ docker-machine env docker-sandbox
|
||||
export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://45.55.222.72:2376"
|
||||
export DOCKER_CERT_PATH="/Users/victoriabialas/.docker/machine/machines/docker-sandbox"
|
||||
export DOCKER_MACHINE_NAME="docker-sandbox"
|
||||
# Run this command to configure your shell:
|
||||
# eval "$(docker-machine env docker-sandbox)"
|
||||
$ docker-machine env docker-sandbox
|
||||
export DOCKER_TLS_VERIFY="1"
|
||||
export DOCKER_HOST="tcp://45.55.222.72:2376"
|
||||
export DOCKER_CERT_PATH="/Users/victoriabialas/.docker/machine/machines/docker-sandbox"
|
||||
export DOCKER_MACHINE_NAME="docker-sandbox"
|
||||
# Run this command to configure your shell:
|
||||
# eval "$(docker-machine env docker-sandbox)"
|
||||
|
||||
$ eval "$(docker-machine env docker-sandbox)"
|
||||
```
|
||||
$ eval "$(docker-machine env docker-sandbox)"
|
||||
|
||||
5. Re-run `docker-machine ls` to verify that our new server is the active machine, as indicated by the asterisk (*) in the ACTIVE column.
|
||||
5. Re-run `docker-machine ls` to verify that our new server is the active machine, as indicated by the asterisk (*) in the ACTIVE column.
|
||||
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default - virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox * digitalocean Running tcp://45.55.222.72:2376
|
||||
```
|
||||
$ docker-machine ls
|
||||
NAME ACTIVE DRIVER STATE URL SWARM
|
||||
default - virtualbox Running tcp://192.168.99.100:2376
|
||||
docker-sandbox * digitalocean Running tcp://45.55.222.72:2376
|
||||
|
||||
6. Run some `docker-machine` commands to inspect the remote host. For example, `docker-machine ip <machine>` gets the host IP address and `docker-machine inspect <machine>` lists all the details.
|
||||
6. Run some `docker-machine` commands to inspect the remote host. For example, `docker-machine ip <machine>` gets the host IP address and `docker-machine inspect <machine>` lists all the details.
|
||||
|
||||
```
|
||||
$ docker-machine ip docker-sandbox
|
||||
104.131.43.236
|
||||
$ docker-machine ip docker-sandbox
|
||||
104.131.43.236
|
||||
|
||||
$ docker-machine inspect docker-sandbox
|
||||
{
|
||||
"ConfigVersion": 3,
|
||||
"Driver": {
|
||||
"IPAddress": "104.131.43.236",
|
||||
"MachineName": "docker-sandbox",
|
||||
"SSHUser": "root",
|
||||
"SSHPort": 22,
|
||||
"SSHKeyPath": "/Users/samanthastevens/.docker/machine/machines/docker-sandbox/id_rsa",
|
||||
"StorePath": "/Users/samanthastevens/.docker/machine",
|
||||
"SwarmMaster": false,
|
||||
"SwarmHost": "tcp://0.0.0.0:3376",
|
||||
"SwarmDiscovery": "",
|
||||
...
|
||||
```
|
||||
$ docker-machine inspect docker-sandbox
|
||||
{
|
||||
"ConfigVersion": 3,
|
||||
"Driver": {
|
||||
"IPAddress": "104.131.43.236",
|
||||
"MachineName": "docker-sandbox",
|
||||
"SSHUser": "root",
|
||||
"SSHPort": 22,
|
||||
"SSHKeyPath": "/Users/samanthastevens/.docker/machine/machines/docker-sandbox/id_rsa",
|
||||
"StorePath": "/Users/samanthastevens/.docker/machine",
|
||||
"SwarmMaster": false,
|
||||
"SwarmHost": "tcp://0.0.0.0:3376",
|
||||
"SwarmDiscovery": "",
|
||||
...
|
||||
|
||||
7. Verify Docker Engine is installed correctly by running `docker` commands.
|
||||
7. Verify Docker Engine is installed correctly by running `docker` commands.
|
||||
|
||||
Start with something basic like `docker run hello-world`, or for a more interesting test, run a Dockerized webserver on your new remote machine.
|
||||
|
||||
In this example, the `-p` option is used to expose port 80 from the `nginx` container and make it accessible on port `8000` of the `docker-sandbox` host.
|
||||
|
||||
```
|
||||
$ docker run -d -p 8000:80 --name webserver kitematic/hello-world-nginx
|
||||
Unable to find image 'kitematic/hello-world-nginx:latest' locally
|
||||
latest: Pulling from kitematic/hello-world-nginx
|
||||
a285d7f063ea: Pull complete
|
||||
2d7baf27389b: Pull complete
|
||||
...
|
||||
Digest: sha256:ec0ca6dcb034916784c988b4f2432716e2e92b995ac606e080c7a54b52b87066
|
||||
Status: Downloaded newer image for kitematic/hello-world-nginx:latest
|
||||
942dfb4a0eaae75bf26c9785ade4ff47ceb2ec2a152be82b9d7960e8b5777e65
|
||||
```
|
||||
$ docker run -d -p 8000:80 --name webserver kitematic/hello-world-nginx
|
||||
Unable to find image 'kitematic/hello-world-nginx:latest' locally
|
||||
latest: Pulling from kitematic/hello-world-nginx
|
||||
a285d7f063ea: Pull complete
|
||||
2d7baf27389b: Pull complete
|
||||
...
|
||||
Digest: sha256:ec0ca6dcb034916784c988b4f2432716e2e92b995ac606e080c7a54b52b87066
|
||||
Status: Downloaded newer image for kitematic/hello-world-nginx:latest
|
||||
942dfb4a0eaae75bf26c9785ade4ff47ceb2ec2a152be82b9d7960e8b5777e65
|
||||
|
||||
In a web browser, go to `http://<host_ip>:8000` to bring up the webserver home page. You got the `<host_ip>` from the output of the `docker-machine ip <machine>` command you ran in a previous step. Use the port you exposed in the `docker run` command.
|
||||
|
||||
|
|
@ -213,6 +196,6 @@ If you create a host with Docker Machine, but remove it through the cloud provid
|
|||
|
||||
* [Use Docker Machine to provision hosts on cloud providers](https://docs.docker.com/machine/get-started-cloud/)
|
||||
|
||||
* [Install Docker Engine](../../installation/index.md)
|
||||
* [Install Docker Engine](../../installation/index.md)
|
||||
|
||||
* [Docker User Guide](../../userguide/intro.md)
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/amazon/
|
||||
- /engine/installation/google/
|
||||
- /engine/installation/softlayer/
|
||||
- /engine/installation/azure/
|
||||
- /engine/installation/rackspace/
|
||||
- /engine/installation/joyent/
|
||||
description: Cloud Installations
|
||||
keywords:
|
||||
- 'Docker install '
|
||||
menu:
|
||||
main:
|
||||
identifier: install_cloud
|
||||
parent: engine_install
|
||||
weight: "-60"
|
||||
title: On cloud providers
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/installation/amazon/",
|
||||
"/engine/installation/google/",
|
||||
"/engine/installation/softlayer/",
|
||||
"/engine/installation/azure/",
|
||||
"/engine/installation/rackspace/",
|
||||
"/engine/installation/joyent/"
|
||||
]
|
||||
title = "On cloud providers"
|
||||
description = "Cloud Installations"
|
||||
keywords = ["Docker install "]
|
||||
[menu.main]
|
||||
identifier = "install_cloud"
|
||||
parent="engine_install"
|
||||
weight="-60"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Engine in the cloud
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/cloud/cloud/
|
||||
description: Installation instructions for Docker on cloud.
|
||||
keywords:
|
||||
- cloud, docker, machine, documentation, installation
|
||||
menu:
|
||||
main:
|
||||
parent: install_cloud
|
||||
weight: -3
|
||||
title: Choose how to install
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [
|
||||
"/engine/installation/cloud/cloud/",
|
||||
]
|
||||
title = "Choose how to install"
|
||||
description = "Installation instructions for Docker on cloud."
|
||||
keywords = ["cloud, docker, machine, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "install_cloud"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Choose how to install
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/linux/frugalware/
|
||||
- /engine/installation/frugalware/
|
||||
description: Lists the installation methods
|
||||
keywords:
|
||||
- 'Docker install '
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_install
|
||||
parent: engine_use
|
||||
weight: "-81"
|
||||
title: Install
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = ["/engine/installation/linux/frugalware/","/engine/installation/frugalware/"]
|
||||
title = "Install"
|
||||
description = "Lists the installation methods"
|
||||
keywords = ["Docker install "]
|
||||
[menu.main]
|
||||
identifier = "engine_install"
|
||||
parent="engine_use"
|
||||
weight="-81"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Docker Engine
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/SUSE/
|
||||
description: Installation instructions for Docker on openSUSE and on SUSE Linux Enterprise.
|
||||
keywords:
|
||||
- openSUSE, SUSE Linux Enterprise, SUSE, SLE, docker, documentation, installation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
title: Installation on openSUSE and SUSE Linux Enterprise
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/SUSE/"]
|
||||
title = "Installation on openSUSE and SUSE Linux Enterprise"
|
||||
description = "Installation instructions for Docker on openSUSE and on SUSE Linux Enterprise."
|
||||
keywords = ["openSUSE, SUSE Linux Enterprise, SUSE, SLE, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# openSUSE and SUSE Linux Enterprise
|
||||
|
||||
|
|
@ -72,7 +71,7 @@ The `docker` package creates a new group named `docker`. Users, other than
|
|||
`root` user, must be part of this group to interact with the
|
||||
Docker daemon. You can add users with this command syntax:
|
||||
|
||||
sudo /usr/sbin/usermod -a -G docker <username>
|
||||
$ sudo /usr/sbin/usermod -a -G docker <username>
|
||||
|
||||
Once you add a user, make sure they relog to pick up these new permissions.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/archlinux/
|
||||
description: Installation instructions for Docker on ArchLinux.
|
||||
keywords:
|
||||
- arch linux, docker, documentation, installation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
title: Installation on Arch Linux
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/archlinux/"]
|
||||
title = "Installation on Arch Linux"
|
||||
description = "Installation instructions for Docker on ArchLinux."
|
||||
keywords = ["arch linux, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Arch Linux
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/centos/
|
||||
description: Instructions for installing Docker on CentOS
|
||||
keywords:
|
||||
- Docker, Docker documentation, requirements, linux, centos, epel, docker.io, docker-io
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
weight: -4
|
||||
title: Installation on CentOS
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/centos/"]
|
||||
title = "Installation on CentOS"
|
||||
description = "Instructions for installing Docker on CentOS"
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, centos, epel, docker.io, docker-io"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# CentOS
|
||||
|
||||
|
|
@ -42,21 +41,21 @@ packages.
|
|||
## Install Docker Engine
|
||||
|
||||
There are two ways to install Docker Engine. You can [install using the `yum`
|
||||
package manager](centos.md#install-with-yum). Or you can use `curl` with the [`get.docker.com`
|
||||
site](centos.md#install-with-the-script). This second method runs an installation script
|
||||
package manager](#install-with-yum). Or you can use `curl` with the [`get.docker.com`
|
||||
site](#install-with-the-script). This second method runs an installation script
|
||||
which also installs via the `yum` package manager.
|
||||
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo yum update
|
||||
```
|
||||
|
||||
3. Add the `yum` repo.
|
||||
3. Add the `yum` repo.
|
||||
|
||||
```bash
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||
|
|
@ -69,19 +68,19 @@ which also installs via the `yum` package manager.
|
|||
EOF
|
||||
```
|
||||
|
||||
4. Install the Docker package.
|
||||
4. Install the Docker package.
|
||||
|
||||
```bash
|
||||
$ sudo yum install docker-engine
|
||||
```
|
||||
|
||||
5. Enable the service.
|
||||
5. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
6. Start the Docker daemon.
|
||||
6. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
|
|
@ -125,13 +124,13 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
|
|||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo yum update
|
||||
```
|
||||
|
||||
3. Run the Docker installation script.
|
||||
3. Run the Docker installation script.
|
||||
|
||||
```bash
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
|
@ -139,19 +138,19 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
|
|||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Enable the service.
|
||||
4. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
5. Start the Docker daemon.
|
||||
5. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
```
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
```bash
|
||||
$ sudo docker run hello-world
|
||||
|
|
@ -179,23 +178,23 @@ To create the `docker` group and add your user:
|
|||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Create the `docker` group.
|
||||
2. Create the `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo groupadd docker
|
||||
```
|
||||
|
||||
3. Add your user to `docker` group.
|
||||
3. Add your user to `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo usermod -aG docker your_username`
|
||||
```
|
||||
|
||||
4. Log out and log back in.
|
||||
4. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
|
||||
```bash
|
||||
$ docker run hello-world
|
||||
|
|
@ -213,7 +212,7 @@ $ sudo systemctl enable docker
|
|||
|
||||
You can uninstall the Docker software with `yum`.
|
||||
|
||||
1. List the installed Docker packages.
|
||||
1. List the installed Docker packages.
|
||||
|
||||
```bash
|
||||
$ yum list installed | grep docker
|
||||
|
|
@ -221,7 +220,7 @@ You can uninstall the Docker software with `yum`.
|
|||
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
|
||||
```
|
||||
|
||||
2. Remove the package.
|
||||
2. Remove the package.
|
||||
|
||||
```bash
|
||||
$ sudo yum -y remove docker-engine.x86_64
|
||||
|
|
@ -230,7 +229,7 @@ You can uninstall the Docker software with `yum`.
|
|||
This command does not remove images, containers, volumes, or user-created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
|
||||
```bash
|
||||
$ rm -rf /var/lib/docker
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/cruxlinux/
|
||||
description: Docker installation on CRUX Linux.
|
||||
keywords:
|
||||
- crux linux, Docker, documentation, installation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
title: Installation on CRUX Linux
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/cruxlinux/"]
|
||||
title = "Installation on CRUX Linux"
|
||||
description = "Docker installation on CRUX Linux."
|
||||
keywords = ["crux linux, Docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# CRUX Linux
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/debian/
|
||||
description: Instructions for installing Docker on Debian.
|
||||
keywords:
|
||||
- Docker, Docker documentation, installation, debian
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
weight: -2
|
||||
title: Installation on Debian
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/debian/"]
|
||||
title = "Installation on Debian"
|
||||
description = "Instructions for installing Docker on Debian."
|
||||
keywords = ["Docker, Docker documentation, installation, debian"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Debian
|
||||
|
||||
Docker is supported on the following versions of Debian:
|
||||
|
||||
- [*Debian testing stretch (64-bit)*](debian.md#debian-wheezy-stable-7-x-64-bit)
|
||||
- [*Debian 8.0 Jessie (64-bit)*](debian.md#debian-jessie-80-64-bit)
|
||||
- [*Debian 7.7 Wheezy (64-bit)*](debian.md#debian-wheezy-stable-7-x-64-bit) (backports required)
|
||||
- [*Debian testing stretch (64-bit)*](#debian-wheezy-stable-7-x-64-bit)
|
||||
- [*Debian 8.0 Jessie (64-bit)*](#debian-jessie-80-64-bit)
|
||||
- [*Debian 7.7 Wheezy (64-bit)*](#debian-wheezy-stable-7-x-64-bit) (backports required)
|
||||
|
||||
>**Note**: If you previously installed Docker using `APT`, make sure you update
|
||||
your `APT` sources to the new `APT` repository.
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/fedora/
|
||||
description: Instructions for installing Docker on Fedora.
|
||||
keywords:
|
||||
- Docker, Docker documentation, Fedora, requirements, linux
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
weight: -3
|
||||
title: Installation on Fedora
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/fedora/"]
|
||||
title = "Installation on Fedora"
|
||||
description = "Instructions for installing Docker on Fedora."
|
||||
keywords = ["Docker, Docker documentation, Fedora, requirements, linux"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Fedora
|
||||
|
||||
|
|
@ -40,21 +39,21 @@ packages.
|
|||
## Install Docker Engine
|
||||
|
||||
There are two ways to install Docker Engine. You can [install using the `dnf`
|
||||
package manager](fedora.md#install-with-dnf). Or you can use `curl` [with the `get.docker.com`
|
||||
site](fedora.md#install-with-the-script). This second method runs an installation script
|
||||
package manager](#install-with-dnf). Or you can use `curl` [with the `get.docker.com`
|
||||
site](#install-with-the-script). This second method runs an installation script
|
||||
which also installs via the `dnf` package manager.
|
||||
|
||||
### Install with DNF
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
3. Add the `yum` repo.
|
||||
3. Add the `yum` repo.
|
||||
|
||||
```bash
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||
|
|
@ -67,19 +66,19 @@ which also installs via the `dnf` package manager.
|
|||
EOF
|
||||
```
|
||||
|
||||
4. Install the Docker package.
|
||||
4. Install the Docker package.
|
||||
|
||||
```bash
|
||||
$ sudo dnf install docker-engine
|
||||
```
|
||||
|
||||
5. Enable the service.
|
||||
5. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
6. Start the Docker daemon.
|
||||
6. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
|
|
@ -125,13 +124,13 @@ You use the same installation procedure for all versions of Fedora.
|
|||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo dnf update
|
||||
```
|
||||
|
||||
3. Run the Docker installation script.
|
||||
3. Run the Docker installation script.
|
||||
|
||||
```bash
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
|
@ -139,19 +138,19 @@ You use the same installation procedure for all versions of Fedora.
|
|||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Enable the service.
|
||||
4. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
5. Start the Docker daemon.
|
||||
5. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
```
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
```bash
|
||||
$ sudo docker run hello-world
|
||||
|
|
@ -179,13 +178,13 @@ To create the `docker` group and add your user:
|
|||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Create the `docker` group.
|
||||
2. Create the `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo groupadd docker
|
||||
```
|
||||
|
||||
3. Add your user to `docker` group.
|
||||
3. Add your user to `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo usermod -aG docker your_username`
|
||||
|
|
@ -195,7 +194,7 @@ To create the `docker` group and add your user:
|
|||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
|
||||
```bash
|
||||
$ docker run hello-world
|
||||
|
|
@ -232,7 +231,7 @@ This configuration allows IP forwarding from the container as expected.
|
|||
|
||||
You can uninstall the Docker software with `dnf`.
|
||||
|
||||
1. List the installed Docker packages.
|
||||
1. List the installed Docker packages.
|
||||
|
||||
```bash
|
||||
$ dnf list installed | grep docker
|
||||
|
|
@ -240,7 +239,7 @@ You can uninstall the Docker software with `dnf`.
|
|||
docker-engine.x86_64 1.7.1-0.1.fc21 @/docker-engine-1.7.1-0.1.fc21.el7.x86_64
|
||||
```
|
||||
|
||||
2. Remove the package.
|
||||
2. Remove the package.
|
||||
|
||||
```bash
|
||||
$ sudo dnf -y remove docker-engine.x86_64
|
||||
|
|
@ -249,7 +248,7 @@ You can uninstall the Docker software with `dnf`.
|
|||
This command does not remove images, containers, volumes, or user-created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
|
||||
```bash
|
||||
$ rm -rf /var/lib/docker
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/gentoolinux/
|
||||
description: Installation instructions for Docker on Gentoo.
|
||||
keywords:
|
||||
- gentoo linux, docker, documentation, installation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
title: Installation on Gentoo
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/gentoolinux/"]
|
||||
title = "Installation on Gentoo"
|
||||
description = "Installation instructions for Docker on Gentoo."
|
||||
keywords = ["gentoo linux, docker, documentation, installation"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Gentoo
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,14 @@
|
|||
---
|
||||
description: Lists the installation methods
|
||||
keywords:
|
||||
- docker
|
||||
- engine
|
||||
- install
|
||||
- linux
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_linux
|
||||
parent: engine_install
|
||||
weight: "-70"
|
||||
title: On Linux distributions
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "On Linux distributions"
|
||||
description = "Lists the installation methods"
|
||||
keywords = ["docker", "engine","install", "linux"]
|
||||
[menu.main]
|
||||
identifier = "engine_linux"
|
||||
parent="engine_install"
|
||||
weight="-70"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Install Docker Engine on Linux
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/oracle/
|
||||
description: Installation instructions for Docker on Oracle Linux.
|
||||
keywords:
|
||||
- Docker, Docker documentation, requirements, linux, rhel, centos, oracle, ol
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
title: Installation on Oracle Linux
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/oracle/"]
|
||||
title = "Installation on Oracle Linux"
|
||||
description = "Installation instructions for Docker on Oracle Linux."
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, rhel, centos, oracle, ol"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Oracle Linux
|
||||
|
||||
|
|
@ -87,11 +86,11 @@ btrfs storage engine on both Oracle Linux 6 and 7.
|
|||
This section contains optional procedures for configuring your Oracle Linux to work
|
||||
better with Docker.
|
||||
|
||||
* [Create a docker group](oracle.md#create-a-docker-group)
|
||||
* [Configure Docker to start on boot](oracle.md#configure-docker-to-start-on-boot)
|
||||
* [Use the btrfs storage engine](oracle.md#use-the-btrfs-storage-engine)
|
||||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
* [Use the btrfs storage engine](#use-the-btrfs-storage-engine)
|
||||
|
||||
### Create a Docker group
|
||||
### Create a Docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/rhel/
|
||||
description: Instructions for installing Docker on Red Hat Enterprise Linux.
|
||||
keywords:
|
||||
- Docker, Docker documentation, requirements, linux, rhel
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
weight: -5
|
||||
title: Installation on Red Hat Enterprise Linux
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/rhel/"]
|
||||
title = "Installation on Red Hat Enterprise Linux"
|
||||
description = "Instructions for installing Docker on Red Hat Enterprise Linux."
|
||||
keywords = ["Docker, Docker documentation, requirements, linux, rhel"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight = -5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Red Hat Enterprise Linux
|
||||
|
||||
|
|
@ -38,21 +37,21 @@ packages.
|
|||
## Install Docker Engine
|
||||
|
||||
There are two ways to install Docker Engine. You can [install using the `yum`
|
||||
package manager](rhel.md#install-with-yum). Or you can use `curl` with the [`get.docker.com`
|
||||
site](rhel.md#install-with-the-script). This second method runs an installation script
|
||||
package manager](#install-with-yum). Or you can use `curl` with the [`get.docker.com`
|
||||
site](#install-with-the-script). This second method runs an installation script
|
||||
which also installs via the `yum` package manager.
|
||||
|
||||
### Install with yum
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo yum update
|
||||
```
|
||||
|
||||
3. Add the `yum` repo.
|
||||
3. Add the `yum` repo.
|
||||
|
||||
```bash
|
||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||
|
|
@ -65,19 +64,19 @@ which also installs via the `yum` package manager.
|
|||
EOF
|
||||
```
|
||||
|
||||
4. Install the Docker package.
|
||||
4. Install the Docker package.
|
||||
|
||||
```bash
|
||||
$ sudo yum install docker-engine
|
||||
```
|
||||
|
||||
5. Enable the service.
|
||||
5. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
6. Start the Docker daemon.
|
||||
6. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
|
|
@ -119,15 +118,15 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
|
|||
|
||||
### Install with the script
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
2. Make sure your existing packages are up-to-date.
|
||||
|
||||
```bash
|
||||
$ sudo yum update
|
||||
```
|
||||
|
||||
3. Run the Docker installation script.
|
||||
3. Run the Docker installation script.
|
||||
|
||||
```bash
|
||||
$ curl -fsSL https://get.docker.com/ | sh
|
||||
|
|
@ -135,19 +134,19 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
|
|||
|
||||
This script adds the `docker.repo` repository and installs Docker.
|
||||
|
||||
4. Enable the service.
|
||||
4. Enable the service.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl enable docker.service
|
||||
```
|
||||
|
||||
5. Start the Docker daemon.
|
||||
5. Start the Docker daemon.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl start docker
|
||||
```
|
||||
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
6. Verify `docker` is installed correctly by running a test image in a container.
|
||||
|
||||
```bash
|
||||
$ sudo docker run hello-world
|
||||
|
|
@ -173,25 +172,25 @@ makes the ownership of the Unix socket read/writable by the `docker` group.
|
|||
|
||||
To create the `docker` group and add your user:
|
||||
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||
|
||||
2. Create the `docker` group.
|
||||
2. Create the `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo groupadd docker
|
||||
```
|
||||
|
||||
3. Add your user to `docker` group.
|
||||
3. Add your user to `docker` group.
|
||||
|
||||
```bash
|
||||
$ sudo usermod -aG docker your_username`
|
||||
```
|
||||
|
||||
4. Log out and log back in.
|
||||
4. Log out and log back in.
|
||||
|
||||
This ensures your user is running with the correct permissions.
|
||||
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
5. Verify that your user is in the docker group by running `docker` without `sudo`.
|
||||
|
||||
```bash
|
||||
$ docker run hello-world
|
||||
|
|
@ -209,7 +208,7 @@ $ sudo systemctl enable docker
|
|||
|
||||
You can uninstall the Docker software with `yum`.
|
||||
|
||||
1. List the installed Docker packages.
|
||||
1. List the installed Docker packages.
|
||||
|
||||
```bash
|
||||
$ yum list installed | grep docker
|
||||
|
|
@ -217,7 +216,7 @@ You can uninstall the Docker software with `yum`.
|
|||
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
|
||||
```
|
||||
|
||||
2. Remove the package.
|
||||
2. Remove the package.
|
||||
|
||||
```bash
|
||||
$ sudo yum -y remove docker-engine.x86_64
|
||||
|
|
@ -226,7 +225,7 @@ You can uninstall the Docker software with `yum`.
|
|||
This command does not remove images, containers, volumes, or user-created
|
||||
configuration files on your host.
|
||||
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
3. To delete all images, containers, and volumes, run the following command:
|
||||
|
||||
```bash
|
||||
$ rm -rf /var/lib/docker
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
---
|
||||
aliases:
|
||||
- /engine/installation/ubuntulinux/
|
||||
description: 'Instructions for installing Docker on Ubuntu. '
|
||||
keywords:
|
||||
- Docker, Docker documentation, requirements, apt, installation, ubuntu
|
||||
menu:
|
||||
main:
|
||||
parent: engine_linux
|
||||
weight: -6
|
||||
title: 'Installation on Ubuntu '
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
aliases = [ "/engine/installation/ubuntulinux/"]
|
||||
title = "Installation on Ubuntu "
|
||||
description = "Instructions for installing Docker on Ubuntu. "
|
||||
keywords = ["Docker, Docker documentation, requirements, apt, installation, ubuntu"]
|
||||
[menu.main]
|
||||
parent = "engine_linux"
|
||||
weight = -6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Ubuntu
|
||||
|
||||
Docker is supported on these Ubuntu operating systems:
|
||||
|
||||
- Ubuntu Xenial 16.04 (LTS)
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
- Ubuntu Precise 12.04 (LTS)
|
||||
|
||||
|
|
@ -82,6 +82,10 @@ packages from the new repository:
|
|||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-trusty main
|
||||
|
||||
- Ubuntu Wily 15.10
|
||||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-wily main
|
||||
|
||||
- Ubuntu Xenial 16.04 (LTS)
|
||||
|
||||
deb https://apt.dockerproject.org/repo ubuntu-xenial main
|
||||
|
|
@ -111,9 +115,10 @@ packages from the new repository:
|
|||
### Prerequisites by Ubuntu Version
|
||||
|
||||
- Ubuntu Xenial 16.04 (LTS)
|
||||
- Ubuntu Wily 15.10
|
||||
- Ubuntu Trusty 14.04 (LTS)
|
||||
|
||||
For Ubuntu Trusty, and Xenial, it's recommended to install the
|
||||
For Ubuntu Trusty, Wily, and Xenial, it's recommended to install the
|
||||
`linux-image-extra-*` kernel packages. The `linux-image-extra-*` packages
|
||||
allows you use the `aufs` storage driver.
|
||||
|
||||
|
|
@ -233,13 +238,13 @@ install Docker using the following:
|
|||
This section contains optional procedures for configuring your Ubuntu to work
|
||||
better with Docker.
|
||||
|
||||
* [Create a docker group](ubuntulinux.md#create-a-docker-group)
|
||||
* [Adjust memory and swap accounting](ubuntulinux.md#adjust-memory-and-swap-accounting)
|
||||
* [Enable UFW forwarding](ubuntulinux.md#enable-ufw-forwarding)
|
||||
* [Configure a DNS server for use by Docker](ubuntulinux.md#configure-a-dns-server-for-use-by-docker)
|
||||
* [Configure Docker to start on boot](ubuntulinux.md#configure-docker-to-start-on-boot)
|
||||
* [Create a docker group](#create-a-docker-group)
|
||||
* [Adjust memory and swap accounting](#adjust-memory-and-swap-accounting)
|
||||
* [Enable UFW forwarding](#enable-ufw-forwarding)
|
||||
* [Configure a DNS server for use by Docker](#configure-a-dns-server-for-use-by-docker)
|
||||
* [Configure Docker to start on boot](#configure-docker-to-start-on-boot)
|
||||
|
||||
### Create a Docker group
|
||||
### Create a Docker group
|
||||
|
||||
The `docker` daemon binds to a Unix socket instead of a TCP port. By default
|
||||
that Unix socket is owned by the user `root` and other users can access it with
|
||||
|
|
|
|||
|
|
@ -1,21 +1,20 @@
|
|||
---
|
||||
description: Instructions for installing Docker on OS X using boot2docker.
|
||||
keywords:
|
||||
- Docker, Docker documentation, requirements, boot2docker, VirtualBox, SSH, Linux,
|
||||
OSX, OS X, Mac
|
||||
menu:
|
||||
main:
|
||||
parent: engine_install
|
||||
weight: "-90"
|
||||
title: Installation on Mac OS X
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation on Mac OS X"
|
||||
description = "Instructions for installing Docker on OS X using boot2docker."
|
||||
keywords = ["Docker, Docker documentation, requirements, boot2docker, VirtualBox, SSH, Linux, OSX, OS X, Mac"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight="-90"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Mac OS X
|
||||
|
||||
You have two options for installing Docker on Mac:
|
||||
|
||||
- [Docker for Mac](mac.md#docker-for-mac)
|
||||
- [Docker Toolbox](mac.md#docker-toolbox)
|
||||
- [Docker for Mac](#docker-for-mac)
|
||||
- [Docker Toolbox](#docker-toolbox)
|
||||
|
||||
## Docker for Mac
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
---
|
||||
description: Docker installation on Microsoft Windows
|
||||
keywords:
|
||||
- Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker
|
||||
menu:
|
||||
main:
|
||||
parent: engine_install
|
||||
weight: "-80"
|
||||
title: Installation on Windows
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Installation on Windows"
|
||||
description = "Docker installation on Microsoft Windows"
|
||||
keywords = ["Docker, Docker documentation, Windows, requirements, virtualbox, boot2docker"]
|
||||
[menu.main]
|
||||
parent = "engine_install"
|
||||
weight="-80"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Windows
|
||||
|
||||
You have two options for installing Docker on Windows:
|
||||
|
||||
- [Docker for Windows](windows.md#docker-for-windows)
|
||||
- [Docker Toolbox](windows.md#docker-toolbox)
|
||||
- [Docker for Windows](#docker-for-windows)
|
||||
- [Docker Toolbox](#docker-toolbox)
|
||||
|
||||
## Docker for Windows
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: Migrate to Engine 1.10
|
||||
keywords:
|
||||
- docker, documentation, engine, upgrade, migration
|
||||
menu:
|
||||
main:
|
||||
parent: engine_use
|
||||
weight: 79
|
||||
title: Migrate to Engine 1.10
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Migrate to Engine 1.10"
|
||||
description = "Migrate to Engine 1.10"
|
||||
keywords = ["docker, documentation, engine, upgrade, migration"]
|
||||
[menu.main]
|
||||
parent = "engine_use"
|
||||
weight=79
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Migrate to Engine 1.10
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
draft: true
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
description: API Documentation for the Docker Hub API
|
||||
draft: true
|
||||
keywords:
|
||||
- API, Docker, index, REST, documentation, Docker Hub, registry
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 99
|
||||
title: Docker Hub API
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
title = "Docker Hub API"
|
||||
description = "API Documentation for the Docker Hub API"
|
||||
keywords = ["API, Docker, index, REST, documentation, Docker Hub, registry"]
|
||||
[menu.main]
|
||||
parent = "engine_remoteapi"
|
||||
weight = 99
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Hub API
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for docker.io accounts.
|
||||
keywords:
|
||||
- API, Docker, accounts, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 90
|
||||
title: docker.io accounts API
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "docker.io accounts API"
|
||||
description = "API Documentation for docker.io accounts."
|
||||
keywords = ["API, Docker, accounts, REST, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_remoteapi"
|
||||
weight=90
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# docker.io accounts API
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -99
|
||||
title: Remote API
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_remoteapi"
|
||||
weight=-99
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API
|
||||
|
||||
|
|
@ -35,15 +35,16 @@ If you have bound the Docker daemon to a different socket path or TCP
|
|||
port, you would reference that in your cURL rather than the
|
||||
default.
|
||||
|
||||
The current version of the API is v1.24 which means calling `/info` is the same
|
||||
as calling `/v1.24/info`. To call an older version of the API use
|
||||
`/v1.23/info`. If a newer daemon is installed, new properties may be returned
|
||||
The current version of the API is v1.25 which means calling `/info` is the same
|
||||
as calling `/v1.25/info`. To call an older version of the API use
|
||||
`/v1.24/info`. If a newer daemon is installed, new properties may be returned
|
||||
even when calling older versions of the API.
|
||||
|
||||
Use the table below to find the API version for a Docker version:
|
||||
|
||||
Docker version | API version | Changes
|
||||
----------------|------------------------------------|------------------------------------------------------
|
||||
1.13.x | [1.25](docker_remote_api_v1.25.md) | [API changes](docker_remote_api.md#v1-25-api-changes)
|
||||
1.12.x | [1.24](docker_remote_api_v1.24.md) | [API changes](docker_remote_api.md#v1-24-api-changes)
|
||||
1.11.x | [1.23](docker_remote_api_v1.23.md) | [API changes](docker_remote_api.md#v1-23-api-changes)
|
||||
1.10.x | [1.22](docker_remote_api_v1.22.md) | [API changes](docker_remote_api.md#v1-22-api-changes)
|
||||
|
|
@ -111,6 +112,28 @@ Running `docker rmi` emits an **untag** event when removing an image name. The
|
|||
|
||||
This section lists each version from latest to oldest. Each listing includes a link to the full documentation set and the changes relevant in that release.
|
||||
|
||||
### v1.25 API changes
|
||||
|
||||
[Docker Remote API v1.25](docker_remote_api_v1.25.md) documentation
|
||||
|
||||
* `GET /images/(name)/json` now returns `OsVersion` if populated
|
||||
* `GET /info` now returns `Isolation`.
|
||||
* `POST /containers/create` now takes `AutoRemove` in HostConfig, to enable auto-removal of the container on daemon side when the container's process exits.
|
||||
* `GET /containers/json` and `GET /containers/(id or name)/json` now return `"removing"` as a value for the `State.Status` field if the container is being removed. Previously, "exited" was returned as status.
|
||||
* `GET /containers/json` now accepts `removing` as a valid value for the `status` filter.
|
||||
* `DELETE /volumes/(name)` now accepts a `force` query parameter to force removal of volumes that were already removed out of band by the volume driver plugin.
|
||||
* `POST /containers/create/` and `POST /containers/(name)/update` now validates restart policies.
|
||||
* `POST /containers/create` now validates IPAMConfig in NetworkingConfig, and returns error for invalid IPv4 and IPv6 addresses (`--ip` and `--ip6` in `docker create/run`).
|
||||
* `POST /containers/create` now takes a `Mounts` field in `HostConfig` which replaces `Binds` and `Volumes`. *note*: `Binds` and `Volumes` are still available but are exclusive with `Mounts`
|
||||
* `POST /build` now performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. Note that this change is _unversioned_ and applied to all API versions.
|
||||
* `POST /build` accepts `cachefrom` parameter to specify images used for build cache.
|
||||
* `GET /networks/` endpoint now correctly returns a list of *all* networks,
|
||||
instead of the default network if a trailing slash is provided, but no `name`
|
||||
or `id`.
|
||||
* `DELETE /containers/(name)` endpoint now returns an error of `removal of container name is already in progress` with status code of 400, when container name is in a state of removal in progress.
|
||||
* `GET /containers/json` now supports a `is-task` filter to filter
|
||||
containers that are tasks (part of a service in swarm mode).
|
||||
|
||||
### v1.24 API changes
|
||||
|
||||
[Docker Remote API v1.24](docker_remote_api_v1.24.md) documentation
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 3
|
||||
title: Remote API v1.18
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.18"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_remoteapi"
|
||||
weight = 3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.18
|
||||
|
||||
|
|
@ -523,9 +523,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -600,9 +598,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -733,7 +729,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.18.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -906,9 +902,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -934,7 +928,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.18.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -988,9 +982,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1083,9 +1075,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1191,9 +1181,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1216,6 +1204,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -1797,7 +1789,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -1826,7 +1818,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -1849,7 +1841,7 @@ See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -1954,9 +1946,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 2
|
||||
title: Remote API v1.19
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.19"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent = "engine_remoteapi"
|
||||
weight = 2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.19
|
||||
|
||||
|
|
@ -537,9 +537,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -616,9 +614,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -770,7 +766,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.19.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -943,9 +939,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -971,7 +965,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.19.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1025,9 +1019,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1120,9 +1112,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1233,9 +1223,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1258,6 +1246,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -1875,7 +1867,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -1904,7 +1896,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -1927,7 +1919,7 @@ See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2035,9 +2027,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 1
|
||||
title: Remote API v1.20
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.20"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight = 1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.20
|
||||
|
||||
|
|
@ -546,9 +546,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -625,9 +623,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -779,7 +775,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.20.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -952,9 +948,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -980,7 +974,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.20.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1034,9 +1028,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1131,9 +1123,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1179,9 +1169,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1236,9 +1224,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1364,9 +1350,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1389,6 +1373,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -2032,7 +2020,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2061,7 +2049,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2084,7 +2072,7 @@ See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2192,9 +2180,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -2
|
||||
title: Remote API v1.21
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.21"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight=-2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.21
|
||||
|
||||
|
|
@ -615,9 +615,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -694,9 +692,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -860,7 +856,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.21.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -1033,9 +1029,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1061,7 +1055,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.21.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1115,9 +1109,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1212,9 +1204,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1260,9 +1250,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1317,9 +1305,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1445,9 +1431,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1470,6 +1454,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -2186,7 +2174,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2215,7 +2203,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2238,7 +2226,7 @@ See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2350,9 +2338,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -3
|
||||
title: Remote API v1.22
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.22"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight=-3
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.22
|
||||
|
||||
|
|
@ -740,9 +740,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -819,9 +817,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -985,7 +981,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.22.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -1204,9 +1200,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1236,7 +1230,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.22.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1290,9 +1284,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1390,9 +1382,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1438,9 +1428,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1495,9 +1483,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1623,9 +1609,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1648,6 +1632,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -2576,7 +2564,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2605,7 +2593,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2628,7 +2616,7 @@ See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2744,9 +2732,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -4
|
||||
title: Remote API v1.23
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.23"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight=-4
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.23
|
||||
|
||||
|
|
@ -766,9 +766,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -845,9 +843,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1014,7 +1010,7 @@ Start the container `id`
|
|||
|
||||
> **Note**:
|
||||
> For backwards compatibility, this endpoint accepts a `HostConfig` as JSON-encoded request body.
|
||||
> See [create a container](docker_remote_api_v1.23.md#create-a-container) for details.
|
||||
> See [create a container](#create-a-container) for details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -1237,9 +1233,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1269,7 +1263,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.23.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1323,9 +1317,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1423,9 +1415,7 @@ Copy files or folders of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1471,9 +1461,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1528,9 +1516,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1656,9 +1642,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1681,6 +1665,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -2624,7 +2612,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2653,7 +2641,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2676,7 +2664,7 @@ See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2700,15 +2688,15 @@ See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format)
|
|||
|
||||
**Example response**:
|
||||
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
details are suppressed, and only a confirmation message is returned as plain text
|
||||
once the action completes.
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
details are suppressed, and only a confirmation message is returned once the
|
||||
action completes.
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 29
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Type: application/json
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
Loaded image: busybox:latest
|
||||
{"stream":"Loaded image: busybox:latest\n"}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -2818,9 +2806,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -5
|
||||
title: Remote API v1.24
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.24"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight=-5
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.24
|
||||
|
||||
|
|
@ -798,9 +798,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -878,9 +876,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1266,9 +1262,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1298,7 +1292,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.24.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1352,9 +1346,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1468,9 +1460,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1525,9 +1515,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1655,9 +1643,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1680,6 +1666,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -2636,7 +2626,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2665,7 +2655,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2688,7 +2678,7 @@ See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2712,15 +2702,15 @@ See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format)
|
|||
|
||||
**Example response**:
|
||||
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
details are suppressed, and only a confirmation message is returned as plain text
|
||||
once the action completes.
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
details are suppressed, and only a confirmation message is returned once the
|
||||
action completes.
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 29
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
Content-Type: application/json
|
||||
Transfer-Encoding: chunked
|
||||
|
||||
Loaded image: busybox:latest
|
||||
{"stream":"Loaded image: busybox:latest\n"}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -2830,9 +2820,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
@ -3013,7 +3001,7 @@ Create a volume
|
|||
|
||||
**JSON fields in response**:
|
||||
|
||||
Refer to the [inspect a volume](docker_remote_api_v1.24.md#inspect-a-volume) section or details about the
|
||||
Refer to the [inspect a volume](#inspect-a-volume) section or details about the
|
||||
JSON fields returned in the response.
|
||||
|
||||
### Inspect a volume
|
||||
|
|
@ -3208,7 +3196,7 @@ Content-Type: application/json
|
|||
"Config": [
|
||||
{
|
||||
"Subnet": "172.19.0.0/16",
|
||||
"Gateway": "172.19.0.1/16"
|
||||
"Gateway": "172.19.0.1"
|
||||
}
|
||||
],
|
||||
"Options": {
|
||||
|
|
@ -3552,7 +3540,7 @@ Content-Type: application/json
|
|||
`POST /plugins/pull?name=<plugin name>`
|
||||
|
||||
Pulls and installs a plugin. After the plugin is installed, it can be enabled
|
||||
using the [`POST /plugins/(plugin name)/enable` endpoint](docker_remote_api_v1.24.md#enable-a-plugin).
|
||||
using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin).
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -3563,7 +3551,7 @@ POST /plugins/pull?name=tiborvass/no-remove:latest HTTP/1.1
|
|||
The `:latest` tag is optional, and is used as default if omitted. When using
|
||||
this endpoint to pull a plugin from the registry, the `X-Registry-Auth` header
|
||||
can be used to include a base64-encoded AuthConfig object. Refer to the [create
|
||||
an image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
||||
an image](#create-an-image) section for more details.
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -3843,7 +3831,7 @@ POST /plugins/tiborvass/no-remove:latest HTTP/1.1
|
|||
The `:latest` tag is optional, and is used as default if omitted. When using
|
||||
this endpoint to push a plugin to the registry, the `X-Registry-Auth` header
|
||||
can be used to include a base64-encoded AuthConfig object. Refer to the [create
|
||||
an image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
||||
an image](#create-an-image) section for more details.
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -4505,7 +4493,7 @@ List services
|
|||
Create a service. When using this endpoint to create a service using a private
|
||||
repository from the registry, the `X-Registry-Auth` header must be used to
|
||||
include a base64-encoded AuthConfig object. Refer to the [create an
|
||||
image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
||||
image](#create-an-image) section for more details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -4667,7 +4655,7 @@ image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
|||
|
||||
- **Content-type** – Set to `"application/json"`.
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either
|
||||
login information, or a token. Refer to the [create an image](docker_remote_api_v1.24.md#create-an-image)
|
||||
login information, or a token. Refer to the [create an image](#create-an-image)
|
||||
section for more details.
|
||||
|
||||
|
||||
|
|
@ -4684,7 +4672,9 @@ Stop and remove the service `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 No Content
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -4789,7 +4779,7 @@ Update a service. When using this endpoint to create a service using a
|
|||
private repository from the registry, the `X-Registry-Auth` header can be used
|
||||
to update the authentication information for that is stored for the service.
|
||||
The header contains a base64-encoded AuthConfig object. Refer to the [create an
|
||||
image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
||||
image](#create-an-image) section for more details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -4905,7 +4895,7 @@ image](docker_remote_api_v1.24.md#create-an-image) section for more details.
|
|||
|
||||
- **Content-type** – Set to `"application/json"`.
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either
|
||||
login information, or a token. Refer to the [create an image](docker_remote_api_v1.24.md#create-an-image)
|
||||
login information, or a token. Refer to the [create an image](#create-an-image)
|
||||
section for more details.
|
||||
|
||||
**Status codes**:
|
||||
|
|
@ -5107,7 +5097,7 @@ List tasks
|
|||
- `id=<task id>`
|
||||
- `name=<task name>`
|
||||
- `service=<service name>`
|
||||
- `node=<node id>`
|
||||
- `node=<node id or name>`
|
||||
- `label=key` or `label="key=value"`
|
||||
- `desired-state=(running | shutdown | accepted)`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
description: API Documentation for Docker
|
||||
draft: true
|
||||
keywords:
|
||||
- API, Docker, rcli, REST, documentation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: -6
|
||||
title: Remote API v1.25
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API v1.25"
|
||||
description = "API Documentation for Docker"
|
||||
keywords = ["API, Docker, rcli, REST, documentation"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight=-6
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API v1.25
|
||||
|
||||
|
|
@ -227,9 +226,12 @@ List containers
|
|||
sizes
|
||||
- **filters** - a JSON encoded value of the filters (a `map[string][]string`) to process on the containers list. Available filters:
|
||||
- `exited=<int>`; -- containers with exit code of `<int>` ;
|
||||
- `status=`(`created`|`restarting`|`running`|`paused`|`exited`|`dead`)
|
||||
- `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`)
|
||||
- `label=key` or `label="key=value"` of a container label
|
||||
- `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
|
||||
`id=<ID>` a container's ID
|
||||
`name=<name>` a container's name
|
||||
`is-task=`(`true`|`false`)
|
||||
- `ancestor`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`)
|
||||
- `before`=(`<container id>` or `<container name>`)
|
||||
- `since`=(`<container id>` or `<container name>`)
|
||||
|
|
@ -336,7 +338,8 @@ Create a container
|
|||
"StorageOpt": {},
|
||||
"CgroupParent": "",
|
||||
"VolumeDriver": "",
|
||||
"ShmSize": 67108864
|
||||
"ShmSize": 67108864,
|
||||
"Mounts": []
|
||||
},
|
||||
"NetworkingConfig": {
|
||||
"EndpointsConfig": {
|
||||
|
|
@ -495,6 +498,24 @@ Create a container
|
|||
- **CgroupParent** - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.
|
||||
- **VolumeDriver** - Driver that this container users to mount volumes.
|
||||
- **ShmSize** - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
|
||||
- **Mounts** – Specification for mounts to be added to the container.
|
||||
- **Target** – Container path.
|
||||
- **Source** – Mount source (e.g. a volume name, a host path).
|
||||
- **Type** – The mount type (`bind`, or `volume`).
|
||||
Available types (for the `Type` field):
|
||||
- **bind** - Mounts a file or directory from the host into the container. Must exist prior to creating the container.
|
||||
- **volume** - Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed.
|
||||
- **ReadOnly** – A boolean indicating whether the mount should be read-only.
|
||||
- **BindOptions** - Optional configuration for the `bind` type.
|
||||
- **Propagation** – A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`.
|
||||
- **VolumeOptions** – Optional configuration for the `volume` type.
|
||||
- **NoCopy** – A boolean indicating if volume should be
|
||||
populated with the data from the target. (Default false)
|
||||
- **Labels** – User-defined name and labels for the volume as key/value pairs: `{"name": "value"}`
|
||||
- **DriverConfig** – Map of driver-specific options.
|
||||
- **Name** - Name of the driver to use to create the volume.
|
||||
- **Options** - key/value map of driver specific options.
|
||||
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -624,7 +645,8 @@ Return low-level information on the container `id`
|
|||
"VolumesFrom": null,
|
||||
"Ulimits": [{}],
|
||||
"VolumeDriver": "",
|
||||
"ShmSize": 67108864
|
||||
"ShmSize": 67108864,
|
||||
"Mounts": []
|
||||
},
|
||||
"HostnamePath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hostname",
|
||||
"HostsPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts",
|
||||
|
|
@ -805,9 +827,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -885,9 +905,7 @@ Export the contents of container `id`
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/octet-stream
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -1273,9 +1291,7 @@ Attach to the container `id`
|
|||
Connection: Upgrade
|
||||
Upgrade: tcp
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1305,7 +1321,7 @@ Attach to the container `id`
|
|||
|
||||
When using the TTY setting is enabled in
|
||||
[`POST /containers/create`
|
||||
](docker_remote_api_v1.25.md#create-a-container),
|
||||
](#create-a-container),
|
||||
the stream is the raw data from the process PTY and client's `stdin`.
|
||||
When the TTY is disabled, then the stream is multiplexed to separate
|
||||
`stdout` and `stderr`.
|
||||
|
|
@ -1359,9 +1375,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
**Example response**
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Query parameters**:
|
||||
|
||||
|
|
@ -1475,9 +1489,7 @@ Get a tar archive of a resource in the filesystem of container `id`.
|
|||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
|
|
@ -1532,9 +1544,7 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1557,6 +1567,38 @@ Upload a tar archive to be extracted to a path in the filesystem of container
|
|||
- no such file or directory (**path** resource does not exist)
|
||||
- **500** – server error
|
||||
|
||||
|
||||
### Prune stopped containers
|
||||
|
||||
`POST /containers/prune`
|
||||
|
||||
Delete stopped containers
|
||||
|
||||
**Example request**:
|
||||
|
||||
POST /containers/prune HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"ContainersDeleted": [
|
||||
"e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148"
|
||||
],
|
||||
"SpaceReclaimed": 109
|
||||
}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
## 3.2 Images
|
||||
|
||||
### List Images
|
||||
|
|
@ -1662,9 +1704,7 @@ Build an image from a Dockerfile
|
|||
|
||||
POST /build HTTP/1.1
|
||||
|
||||
{% raw %}
|
||||
{{ TAR STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -1687,6 +1727,10 @@ The archive may include any number of other files,
|
|||
which are accessible in the build context (See the [*ADD build
|
||||
command*](../../reference/builder.md#add)).
|
||||
|
||||
The Docker daemon performs a preliminary validation of the `Dockerfile` before
|
||||
starting the build, and returns an error if the syntax is incorrect. After that,
|
||||
each instruction is run one-by-one until the ID of the new image is output.
|
||||
|
||||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
|
|
@ -1706,6 +1750,7 @@ or being killed.
|
|||
there must be a file with the corresponding path inside the tarball.
|
||||
- **q** – Suppress verbose build output.
|
||||
- **nocache** – Do not use the cache when building the image.
|
||||
- **cachefrom** - JSON array of images used for build cache resolution.
|
||||
- **pull** - Attempt to pull the image even if an older image exists locally.
|
||||
- **rm** - Remove intermediate containers after a successful build (default behavior).
|
||||
- **forcerm** - Always remove intermediate containers (includes `rm`).
|
||||
|
|
@ -1839,7 +1884,7 @@ Return low-level information on the image `name`
|
|||
|
||||
GET /images/example/json HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
**Example response (Linux daemon)**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
|
@ -1941,6 +1986,86 @@ Return low-level information on the image `name`
|
|||
}
|
||||
}
|
||||
|
||||
**Example response (Windows daemon)**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
[
|
||||
{
|
||||
"Id": "sha256:105d76d0f40e38427c63023ffe649bf36fa85058d3469551e43e4dcc2431fb31",
|
||||
"RepoTags": [
|
||||
"microsoft/nanoserver:latest"
|
||||
],
|
||||
"RepoDigests": [
|
||||
"microsoft/nanoserver@sha256:aee7d4330fe3dc5987c808f647441c16ed2fa1c7d9c6ef49d6498e5c9860b50b"
|
||||
],
|
||||
"Parent": "",
|
||||
"Comment": "",
|
||||
"Created": "2016-09-22T02:39:30.9154862-07:00",
|
||||
"Container": "",
|
||||
"ContainerConfig": {
|
||||
"Hostname": "",
|
||||
"Domainname": "",
|
||||
"User": "",
|
||||
"AttachStdin": false,
|
||||
"AttachStdout": false,
|
||||
"AttachStderr": false,
|
||||
"Tty": false,
|
||||
"OpenStdin": false,
|
||||
"StdinOnce": false,
|
||||
"Env": null,
|
||||
"Cmd": null,
|
||||
"Image": "",
|
||||
"Volumes": null,
|
||||
"WorkingDir": "",
|
||||
"Entrypoint": null,
|
||||
"OnBuild": null,
|
||||
"Labels": null
|
||||
},
|
||||
"DockerVersion": "",
|
||||
"Author": "",
|
||||
"Config": {
|
||||
"Hostname": "",
|
||||
"Domainname": "",
|
||||
"User": "",
|
||||
"AttachStdin": false,
|
||||
"AttachStdout": false,
|
||||
"AttachStderr": false,
|
||||
"Tty": false,
|
||||
"OpenStdin": false,
|
||||
"StdinOnce": false,
|
||||
"Env": null,
|
||||
"Cmd": [
|
||||
"c:\\windows\\system32\\cmd.exe"
|
||||
],
|
||||
"Image": "",
|
||||
"Volumes": null,
|
||||
"WorkingDir": "",
|
||||
"Entrypoint": null,
|
||||
"OnBuild": null,
|
||||
"Labels": null
|
||||
},
|
||||
"Architecture": "",
|
||||
"Os": "windows",
|
||||
"OsVersion": "10.0.14393",
|
||||
"Size": 651862727,
|
||||
"VirtualSize": 651862727,
|
||||
"GraphDriver": {
|
||||
"Name": "windowsfilter",
|
||||
"Data": {
|
||||
"dir": "C:\\control\\windowsfilter\\6fe6a289b98276a6a5ca0345156ca61d7b38f3da6bb49ef95af1d0f1ac37e5bf"
|
||||
}
|
||||
},
|
||||
"RootFS": {
|
||||
"Type": "layers",
|
||||
"Layers": [
|
||||
"sha256:342d4e407550c52261edd20cd901b5ce438f0b1e940336de3978210612365063"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
|
|
@ -2181,6 +2306,54 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
### Prune unused images
|
||||
|
||||
`POST /images/prune`
|
||||
|
||||
Delete unused images
|
||||
|
||||
**Example request**:
|
||||
|
||||
POST /images/prune HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"DanglingOnly": false
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"ImagesDeleted": [
|
||||
{
|
||||
"Untagged": "busybox:latest"
|
||||
},
|
||||
{
|
||||
"Untagged": "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
|
||||
},
|
||||
{
|
||||
"Deleted": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
|
||||
},
|
||||
{
|
||||
"Deleted": "sha256:8ac8bfaff55af948c796026ee867448c5b5b5d9dd3549f4006d9759b25d4a893"
|
||||
}
|
||||
],
|
||||
"SpaceReclaimed": 1092588
|
||||
}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
- **DanglingOnly**: if `true` only delete unused *and* untagged images. Default to `false` if omitted
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
|
||||
## 3.3 Misc
|
||||
|
||||
### Check auth configuration
|
||||
|
|
@ -2226,7 +2399,7 @@ Display system-wide information
|
|||
|
||||
GET /info HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
**Example response (Linux)**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
|
@ -2304,6 +2477,198 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
|
||||
**Example response (Windows)**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"ID": "NYMS:B5VK:UMSL:FVDZ:EWB5:FKVK:LPFL:FJMQ:H6FT:BZJ6:L2TD:XH62",
|
||||
"Containers": 1,
|
||||
"ContainersRunning": 0,
|
||||
"ContainersPaused": 0,
|
||||
"ContainersStopped": 1,
|
||||
"Images": 17,
|
||||
"Driver": "windowsfilter",
|
||||
"DriverStatus": [
|
||||
["Windows", ""]
|
||||
],
|
||||
"SystemStatus": null,
|
||||
"Plugins": {
|
||||
"Volume": ["local"],
|
||||
"Network": ["nat", "null", "overlay"],
|
||||
"Authorization": null
|
||||
},
|
||||
"MemoryLimit": false,
|
||||
"SwapLimit": false,
|
||||
"KernelMemory": false,
|
||||
"CpuCfsPeriod": false,
|
||||
"CpuCfsQuota": false,
|
||||
"CPUShares": false,
|
||||
"CPUSet": false,
|
||||
"IPv4Forwarding": true,
|
||||
"BridgeNfIptables": true,
|
||||
"BridgeNfIp6tables": true,
|
||||
"Debug": false,
|
||||
"NFd": -1,
|
||||
"OomKillDisable": false,
|
||||
"NGoroutines": 11,
|
||||
"SystemTime": "2016-09-23T11:59:58.9843533-07:00",
|
||||
"LoggingDriver": "json-file",
|
||||
"CgroupDriver": "",
|
||||
"NEventsListener": 0,
|
||||
"KernelVersion": "10.0 14393 (14393.206.amd64fre.rs1_release.160912-1937)",
|
||||
"OperatingSystem": "Windows Server 2016 Datacenter",
|
||||
"OSType": "windows",
|
||||
"Architecture": "x86_64",
|
||||
"IndexServerAddress": "https://index.docker.io/v1/",
|
||||
"RegistryConfig": {
|
||||
"InsecureRegistryCIDRs": ["127.0.0.0/8"],
|
||||
"IndexConfigs": {
|
||||
"docker.io": {
|
||||
"Name": "docker.io",
|
||||
"Mirrors": null,
|
||||
"Secure": true,
|
||||
"Official": true
|
||||
}
|
||||
},
|
||||
"Mirrors": null
|
||||
},
|
||||
"NCPU": 8,
|
||||
"MemTotal": 4293828608,
|
||||
"DockerRootDir": "C:\\control",
|
||||
"HttpProxy": "",
|
||||
"HttpsProxy": "",
|
||||
"NoProxy": "",
|
||||
"Name": "WIN-V0V70C0LU5P",
|
||||
"Labels": null,
|
||||
"ExperimentalBuild": false,
|
||||
"ServerVersion": "1.13.0-dev",
|
||||
"ClusterStore": "",
|
||||
"ClusterAdvertise": "",
|
||||
"SecurityOptions": null,
|
||||
"Runtimes": null,
|
||||
"DefaultRuntime": "",
|
||||
"Swarm": {
|
||||
"NodeID": "",
|
||||
"NodeAddr": "",
|
||||
"LocalNodeState": "inactive",
|
||||
"ControlAvailable": false,
|
||||
"Error": "",
|
||||
"RemoteManagers": null,
|
||||
"Nodes": 0,
|
||||
"Managers": 0,
|
||||
"Cluster": {
|
||||
"ID": "",
|
||||
"Version": {},
|
||||
"CreatedAt": "0001-01-01T00:00:00Z",
|
||||
"UpdatedAt": "0001-01-01T00:00:00Z",
|
||||
"Spec": {
|
||||
"Orchestration": {},
|
||||
"Raft": {
|
||||
"ElectionTick": 0,
|
||||
"HeartbeatTick": 0
|
||||
},
|
||||
"Dispatcher": {},
|
||||
"CAConfig": {},
|
||||
"TaskDefaults": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"LiveRestoreEnabled": false,
|
||||
"Isolation": "process"
|
||||
}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
### Show docker data usage information
|
||||
|
||||
`GET /system/df`
|
||||
|
||||
Return docker data usage information
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /system/df HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
{
|
||||
"LayersSize": 1092588,
|
||||
"Images": [
|
||||
{
|
||||
"Id": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749",
|
||||
"ParentId": "",
|
||||
"RepoTags": [
|
||||
"busybox:latest"
|
||||
],
|
||||
"RepoDigests": [
|
||||
"busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6"
|
||||
],
|
||||
"Created": 1466724217,
|
||||
"Size": 1092588,
|
||||
"SharedSize": 0,
|
||||
"VirtualSize": 1092588,
|
||||
"Labels": {},
|
||||
"Containers": 1
|
||||
}
|
||||
],
|
||||
"Containers": [
|
||||
{
|
||||
"Id": "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148",
|
||||
"Names": [
|
||||
"/top"
|
||||
],
|
||||
"Image": "busybox",
|
||||
"ImageID": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749",
|
||||
"Command": "top",
|
||||
"Created": 1472592424,
|
||||
"Ports": [],
|
||||
"SizeRootFs": 1092588,
|
||||
"Labels": {},
|
||||
"State": "exited",
|
||||
"Status": "Exited (0) 56 minutes ago",
|
||||
"HostConfig": {
|
||||
"NetworkMode": "default"
|
||||
},
|
||||
"NetworkSettings": {
|
||||
"Networks": {
|
||||
"bridge": {
|
||||
"IPAMConfig": null,
|
||||
"Links": null,
|
||||
"Aliases": null,
|
||||
"NetworkID": "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92",
|
||||
"EndpointID": "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a",
|
||||
"Gateway": "172.18.0.1",
|
||||
"IPAddress": "172.18.0.2",
|
||||
"IPPrefixLen": 16,
|
||||
"IPv6Gateway": "",
|
||||
"GlobalIPv6Address": "",
|
||||
"GlobalIPv6PrefixLen": 0,
|
||||
"MacAddress": "02:42:ac:12:00:02"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mounts": []
|
||||
}
|
||||
],
|
||||
"Volumes": [
|
||||
{
|
||||
"Name": "my-volume",
|
||||
"Driver": "local",
|
||||
"Mountpoint": "",
|
||||
"Labels": null,
|
||||
"Scope": "",
|
||||
"Size": 0,
|
||||
"RefCount": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
|
|
@ -2652,7 +3017,7 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
|
|||
image (and its parents) are returned, but with the exclusion of the
|
||||
'repositories' file in the tarball, as there were no image names referenced.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2681,7 +3046,7 @@ For each value of the `names` parameter: if it is a specific name and tag (e.g.
|
|||
an image ID, similarly only that image (and its parents) are returned and there
|
||||
would be no names referenced in the 'repositories' file for this image ID.
|
||||
|
||||
See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2704,7 +3069,7 @@ See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format)
|
|||
`POST /images/load`
|
||||
|
||||
Load a set of images and tags into a Docker repository.
|
||||
See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details.
|
||||
See the [image tarball format](#image-tarball-format) for more details.
|
||||
|
||||
**Example request**
|
||||
|
||||
|
|
@ -2728,7 +3093,7 @@ See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format)
|
|||
|
||||
**Example response**:
|
||||
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
If the "quiet" query parameter is set to `true` / `1` (`?quiet=1`), progress
|
||||
details are suppressed, and only a confirmation message is returned once the
|
||||
action completes.
|
||||
|
||||
|
|
@ -2846,9 +3211,7 @@ interactive session with the `exec` command.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{% raw %}
|
||||
{{ STREAM }}
|
||||
{% endraw %}
|
||||
|
||||
**JSON parameters**:
|
||||
|
||||
|
|
@ -3032,7 +3395,7 @@ Create a volume
|
|||
|
||||
**JSON fields in response**:
|
||||
|
||||
Refer to the [inspect a volume](docker_remote_api_v1.25.md#inspect-a-volume) section or details about the
|
||||
Refer to the [inspect a volume](#inspect-a-volume) section or details about the
|
||||
JSON fields returned in the response.
|
||||
|
||||
### Inspect a volume
|
||||
|
|
@ -3101,6 +3464,11 @@ Instruct the driver to remove the volume (`name`).
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
**Query Parameters**:
|
||||
|
||||
- **force** - 1/True/true or 0/False/false, Force the removal of the volume.
|
||||
Default `false`.
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
|
|
@ -3108,6 +3476,38 @@ Instruct the driver to remove the volume (`name`).
|
|||
- **409** - volume is in use and cannot be removed
|
||||
- **500** - server error
|
||||
|
||||
### Prune unused volumes
|
||||
|
||||
`POST /volumes/prune`
|
||||
|
||||
Delete unused volumes
|
||||
|
||||
**Example request**:
|
||||
|
||||
POST /volumes/prune HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"VolumesDeleted": [
|
||||
"my-volume"
|
||||
],
|
||||
"SpaceReclaimed": 42
|
||||
}
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
|
||||
## 3.5 Networks
|
||||
|
||||
### List networks
|
||||
|
|
@ -3571,7 +3971,7 @@ Content-Type: application/json
|
|||
`POST /plugins/pull?name=<plugin name>`
|
||||
|
||||
Pulls and installs a plugin. After the plugin is installed, it can be enabled
|
||||
using the [`POST /plugins/(plugin name)/enable` endpoint](docker_remote_api_v1.25.md#enable-a-plugin).
|
||||
using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin).
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -3582,7 +3982,7 @@ POST /plugins/pull?name=tiborvass/no-remove:latest HTTP/1.1
|
|||
The `:latest` tag is optional, and is used as default if omitted. When using
|
||||
this endpoint to pull a plugin from the registry, the `X-Registry-Auth` header
|
||||
can be used to include a base64-encoded AuthConfig object. Refer to the [create
|
||||
an image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
||||
an image](#create-an-image) section for more details.
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -3879,7 +4279,7 @@ POST /plugins/tiborvass/no-remove:latest HTTP/1.1
|
|||
The `:latest` tag is optional, and is used as default if omitted. When using
|
||||
this endpoint to push a plugin to the registry, the `X-Registry-Auth` header
|
||||
can be used to include a base64-encoded AuthConfig object. Refer to the [create
|
||||
an image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
||||
an image](#create-an-image) section for more details.
|
||||
|
||||
**Example response**:
|
||||
|
||||
|
|
@ -4541,7 +4941,7 @@ List services
|
|||
Create a service. When using this endpoint to create a service using a private
|
||||
repository from the registry, the `X-Registry-Auth` header must be used to
|
||||
include a base64-encoded AuthConfig object. Refer to the [create an
|
||||
image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
||||
image](#create-an-image) section for more details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -4703,7 +5103,7 @@ image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
|||
|
||||
- **Content-type** – Set to `"application/json"`.
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either
|
||||
login information, or a token. Refer to the [create an image](docker_remote_api_v1.25.md#create-an-image)
|
||||
login information, or a token. Refer to the [create an image](#create-an-image)
|
||||
section for more details.
|
||||
|
||||
|
||||
|
|
@ -4720,7 +5120,9 @@ Stop and remove the service `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 No Content
|
||||
HTTP/1.1 200 OK
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
**Status codes**:
|
||||
|
||||
|
|
@ -4825,7 +5227,7 @@ Update a service. When using this endpoint to create a service using a
|
|||
private repository from the registry, the `X-Registry-Auth` header can be used
|
||||
to update the authentication information for that is stored for the service.
|
||||
The header contains a base64-encoded AuthConfig object. Refer to the [create an
|
||||
image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
||||
image](#create-an-image) section for more details.
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
|
@ -4941,7 +5343,7 @@ image](docker_remote_api_v1.25.md#create-an-image) section for more details.
|
|||
|
||||
- **Content-type** – Set to `"application/json"`.
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either
|
||||
login information, or a token. Refer to the [create an image](docker_remote_api_v1.25.md#create-an-image)
|
||||
login information, or a token. Refer to the [create an image](#create-an-image)
|
||||
section for more details.
|
||||
|
||||
**Status codes**:
|
||||
|
|
@ -5143,7 +5545,7 @@ List tasks
|
|||
- `id=<task id>`
|
||||
- `name=<task name>`
|
||||
- `service=<service name>`
|
||||
- `node=<node id>`
|
||||
- `node=<node id or name>`
|
||||
- `label=key` or `label="key=value"`
|
||||
- `desired-state=(running | shutdown | accepted)`
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: Documentation for docker Registry and Registry API
|
||||
draft: true
|
||||
keywords:
|
||||
- docker, registry, api, hub
|
||||
menu:
|
||||
main:
|
||||
parent: smn_hub_ref
|
||||
title: The Docker Hub and the Registry v1
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
title = "The Docker Hub and the Registry v1"
|
||||
description = "Documentation for docker Registry and Registry API"
|
||||
keywords = ["docker, registry, api, hub"]
|
||||
[menu.main]
|
||||
parent="smn_hub_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# The Docker Hub and the Registry v1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
description: Reference
|
||||
keywords:
|
||||
- Engine
|
||||
menu:
|
||||
main:
|
||||
identifier: engine_remoteapi
|
||||
parent: engine_ref
|
||||
title: API Reference
|
||||
---
|
||||
<!-- [metadata]>
|
||||
+++
|
||||
title = "API Reference"
|
||||
description = "Reference"
|
||||
keywords = ["Engine"]
|
||||
[menu.main]
|
||||
identifier="engine_remoteapi"
|
||||
parent="engine_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# API Reference
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
---
|
||||
description: Various client libraries available to use with the Docker remote API
|
||||
keywords:
|
||||
- API, Docker, index, registry, REST, documentation, clients, C#, Erlang, Go, Groovy,
|
||||
Java, JavaScript, Perl, PHP, Python, Ruby, Rust, Scala
|
||||
menu:
|
||||
main:
|
||||
parent: engine_remoteapi
|
||||
weight: 90
|
||||
title: Remote API client libraries
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Remote API client libraries"
|
||||
description = "Various client libraries available to use with the Docker remote API"
|
||||
keywords = ["API, Docker, index, registry, REST, documentation, clients, C#, Erlang, Go, Groovy, Java, JavaScript, Perl, PHP, Python, Ruby, Rust, Scala"]
|
||||
[menu.main]
|
||||
parent="engine_remoteapi"
|
||||
weight = 90
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Remote API client libraries
|
||||
|
||||
|
|
@ -51,11 +50,6 @@ with the library maintainers.
|
|||
<td>bwu_docker</td>
|
||||
<td><a class="reference external" href="https://github.com/bwu-dart/bwu_docker">https://github.com/bwu-dart/bwu_docker</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Go</td>
|
||||
<td>engine-api</td>
|
||||
<td><a class="reference external" href="https://github.com/docker/engine-api">https://github.com/docker/engine-api</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gradle</td>
|
||||
<td>gradle-docker-plugin</td>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
---
|
||||
aliases:
|
||||
- /reference/builder/
|
||||
description: Dockerfiles use a simple DSL which allows you to automate the steps you
|
||||
would normally manually take to create an image.
|
||||
keywords:
|
||||
- builder, docker, Dockerfile, automation, image creation
|
||||
menu:
|
||||
main:
|
||||
parent: engine_ref
|
||||
weight: -90
|
||||
title: Dockerfile reference
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Dockerfile reference"
|
||||
description = "Dockerfiles use a simple DSL which allows you to automate the steps you would normally manually take to create an image."
|
||||
keywords = ["builder, docker, Dockerfile, automation, image creation"]
|
||||
[menu.main]
|
||||
parent = "engine_ref"
|
||||
weight=-90
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Dockerfile reference
|
||||
|
||||
|
|
@ -53,7 +50,7 @@ To use a file in the build context, the `Dockerfile` refers to the file specifie
|
|||
in an instruction, for example, a `COPY` instruction. To increase the build's
|
||||
performance, exclude files and directories by adding a `.dockerignore` file to
|
||||
the context directory. For information about how to [create a `.dockerignore`
|
||||
file](builder.md#dockerignore-file) see the documentation on this page.
|
||||
file](#dockerignore-file) see the documentation on this page.
|
||||
|
||||
Traditionally, the `Dockerfile` is called `Dockerfile` and located in the root
|
||||
of the context. You use the `-f` flag with `docker build` to point to a Dockerfile
|
||||
|
|
@ -71,6 +68,13 @@ add multiple `-t` parameters when you run the `build` command:
|
|||
|
||||
$ docker build -t shykes/myapp:1.0.2 -t shykes/myapp:latest .
|
||||
|
||||
Before the Docker daemon runs the instructions in the `Dockerfile`, it performs
|
||||
a preliminary validation of the `Dockerfile` and returns an error if the syntax is incorrect:
|
||||
|
||||
$ docker build -t test/myapp .
|
||||
Sending build context to Docker daemon 2.048 kB
|
||||
Error response from daemon: Unknown instruction: RUNCMD
|
||||
|
||||
The Docker daemon runs the instructions in the `Dockerfile` one-by-one,
|
||||
committing the result of each instruction
|
||||
to a new image if necessary, before finally outputting the ID of your
|
||||
|
|
@ -102,6 +106,13 @@ the `Using cache` message in the console output.
|
|||
---> 7ea8aef582cc
|
||||
Successfully built 7ea8aef582cc
|
||||
|
||||
Build cache is only used from images that have a local parent chain. This means
|
||||
that these images were created by previous builds or the whole chain of images
|
||||
was loaded with `docker load`. If you wish to use build cache of a specific
|
||||
image you can specify it with `--cache-from` option. Images specified with
|
||||
`--cache-from` do not need to have a parent chain and may be pulled from other
|
||||
registries.
|
||||
|
||||
When you're done with your build, you're ready to look into [*Pushing a
|
||||
repository to its registry*](../tutorials/dockerrepos.md#contributing-to-docker-hub).
|
||||
|
||||
|
|
@ -301,7 +312,7 @@ Results in:
|
|||
|
||||
## Environment replacement
|
||||
|
||||
Environment variables (declared with [the `ENV` statement](builder.md#env)) can also be
|
||||
Environment variables (declared with [the `ENV` statement](#env)) can also be
|
||||
used in certain instructions as variables to be interpreted by the
|
||||
`Dockerfile`. Escapes are also handled for including variable-like syntax
|
||||
into a statement literally.
|
||||
|
|
@ -489,13 +500,6 @@ before each new `FROM` command.
|
|||
assumes a `latest` by default. The builder returns an error if it cannot match
|
||||
the `tag` value.
|
||||
|
||||
## MAINTAINER
|
||||
|
||||
MAINTAINER <name>
|
||||
|
||||
The `MAINTAINER` instruction allows you to set the *Author* field of the
|
||||
generated images.
|
||||
|
||||
## RUN
|
||||
|
||||
RUN has 2 forms:
|
||||
|
|
@ -505,7 +509,7 @@ default is `/bin/sh -c` on Linux or `cmd /S /C` on Windows)
|
|||
- `RUN ["executable", "param1", "param2"]` (*exec* form)
|
||||
|
||||
The `RUN` instruction will execute any commands in a new layer on top of the
|
||||
current image and commit the results. The resulting committed image will be
|
||||
current image and commit the results. The resulting comitted image will be
|
||||
used for the next step in the `Dockerfile`.
|
||||
|
||||
Layering `RUN` instructions and generating commits conforms to the core
|
||||
|
|
@ -567,7 +571,7 @@ See the [`Dockerfile` Best Practices
|
|||
guide](../userguide/eng-image/dockerfile_best-practices.md#build-cache) for more information.
|
||||
|
||||
The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
|
||||
[below](builder.md#add) for details.
|
||||
[below](#add) for details.
|
||||
|
||||
### Known issues (RUN)
|
||||
|
||||
|
|
@ -636,7 +640,7 @@ must be individually expressed as strings in the array:
|
|||
|
||||
If you would like your container to run the same executable every time, then
|
||||
you should consider using `ENTRYPOINT` in combination with `CMD`. See
|
||||
[*ENTRYPOINT*](builder.md#entrypoint).
|
||||
[*ENTRYPOINT*](#entrypoint).
|
||||
|
||||
If the user specifies arguments to `docker run` then they will override the
|
||||
default specified in `CMD`.
|
||||
|
|
@ -690,6 +694,20 @@ To view an image's labels, use the `docker inspect` command.
|
|||
"other": "value3"
|
||||
},
|
||||
|
||||
## MAINTAINER (deprecated)
|
||||
|
||||
MAINTAINER <name>
|
||||
|
||||
The `MAINTAINER` instruction sets the *Author* field of the generated images.
|
||||
The `LABEL` instruction is a much more flexible version of this and you should use
|
||||
it instead, as it enables setting any metadata you require, and can be viewed
|
||||
easily, for example with `docker inspect`. To set a label corresponding to the
|
||||
`MAINTAINER` field you could use:
|
||||
|
||||
LABEL maintainer "SvenDowideit@home.org.au"
|
||||
|
||||
This will then be visible from `docker inspect` with the other labels.
|
||||
|
||||
## EXPOSE
|
||||
|
||||
EXPOSE <port> [<port>...]
|
||||
|
|
@ -714,7 +732,7 @@ feature](../userguide/networking/index.md)).
|
|||
|
||||
The `ENV` instruction sets the environment variable `<key>` to the value
|
||||
`<value>`. This value will be in the environment of all "descendant"
|
||||
`Dockerfile` commands and can be [replaced inline](builder.md#environment-replacement) in
|
||||
`Dockerfile` commands and can be [replaced inline](#environment-replacement) in
|
||||
many as well.
|
||||
|
||||
The `ENV` instruction has two forms. The first form, `ENV <key> <value>`,
|
||||
|
|
@ -1164,12 +1182,12 @@ or for executing an ad-hoc command in a container.
|
|||
|
||||
The table below shows what command is executed for different `ENTRYPOINT` / `CMD` combinations:
|
||||
|
||||
| | No ENTRYPOINT | ENTRYPOINT exec_entry p1_entry | ENTRYPOINT ["exec_entry", "p1_entry"] |
|
||||
|--------------------------------|----------------------------|-----------------------------------------------------------|------------------------------------------------|
|
||||
| **No CMD** | *error, not allowed* | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry |
|
||||
| **CMD ["exec_cmd", "p1_cmd"]** | exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry exec_cmd p1_cmd | exec_entry p1_entry exec_cmd p1_cmd |
|
||||
| **CMD ["p1_cmd", "p2_cmd"]** | p1_cmd p2_cmd | /bin/sh -c exec_entry p1_entry p1_cmd p2_cmd | exec_entry p1_entry p1_cmd p2_cmd |
|
||||
| **CMD exec_cmd p1_cmd** | /bin/sh -c exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry /bin/sh -c exec_cmd p1_cmd | exec_entry p1_entry /bin/sh -c exec_cmd p1_cmd |
|
||||
| | No ENTRYPOINT | ENTRYPOINT exec_entry p1_entry | ENTRYPOINT ["exec_entry", "p1_entry"] |
|
||||
|--------------------------------|----------------------------|--------------------------------|------------------------------------------------|
|
||||
| **No CMD** | *error, not allowed* | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry |
|
||||
| **CMD ["exec_cmd", "p1_cmd"]** | exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry exec_cmd p1_cmd |
|
||||
| **CMD ["p1_cmd", "p2_cmd"]** | p1_cmd p2_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry p1_cmd p2_cmd |
|
||||
| **CMD exec_cmd p1_cmd** | /bin/sh -c exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry /bin/sh -c exec_cmd p1_cmd |
|
||||
|
||||
## VOLUME
|
||||
|
||||
|
|
@ -1250,9 +1268,9 @@ The output of the final `pwd` command in this `Dockerfile` would be
|
|||
ARG <name>[=<default value>]
|
||||
|
||||
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 <varname>=<value>` flag. If a user specifies a build argument
|
||||
that was not defined in the Dockerfile, the build outputs an error.
|
||||
the builder with the `docker build` command using the `--build-arg
|
||||
<varname>=<value>` flag. If a user specifies a build argument that was not
|
||||
defined in the Dockerfile, the build outputs an error.
|
||||
|
||||
```
|
||||
One or more build-args were not consumed, failing build.
|
||||
|
|
@ -1351,7 +1369,7 @@ its value would be `v1.0.0` as it is the default set in line 3 by the `ENV` inst
|
|||
The variable expansion technique in this example allows you to pass arguments
|
||||
from the command line and persist them in the final image by leveraging the
|
||||
`ENV` instruction. Variable expansion is only supported for [a limited set of
|
||||
Dockerfile instructions.](builder.md#environment-replacement)
|
||||
Dockerfile instructions.](#environment-replacement)
|
||||
|
||||
Docker has a set of predefined `ARG` variables that you can use without a
|
||||
corresponding `ARG` instruction in the Dockerfile.
|
||||
|
|
@ -1365,11 +1383,8 @@ corresponding `ARG` instruction in the Dockerfile.
|
|||
* `NO_PROXY`
|
||||
* `no_proxy`
|
||||
|
||||
To use these, simply pass them on the command line using the flag:
|
||||
|
||||
```
|
||||
--build-arg <varname>=<value>
|
||||
```
|
||||
To use these, simply pass them on the command line using the `--build-arg
|
||||
<varname>=<value>` flag.
|
||||
|
||||
### Impact on build caching
|
||||
|
||||
|
|
@ -1682,8 +1697,6 @@ something more realistic, take a look at the list of [Dockerization examples](..
|
|||
# VERSION 0.0.1
|
||||
|
||||
FROM ubuntu
|
||||
MAINTAINER Victor Vieux <victor@docker.com>
|
||||
|
||||
LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
|
||||
RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: The attach command description and usage
|
||||
keywords:
|
||||
- attach, running, container
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: attach
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "attach"
|
||||
description = "The attach command description and usage"
|
||||
keywords = ["attach, running, container"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# attach
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: The build command description and usage
|
||||
keywords:
|
||||
- build, docker, image
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: build
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "build"
|
||||
description = "The build command description and usage"
|
||||
keywords = ["build, docker, image"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# build
|
||||
|
||||
|
|
@ -17,7 +17,9 @@ Build an image from a Dockerfile
|
|||
|
||||
Options:
|
||||
--build-arg value Set build-time variables (default [])
|
||||
--cache-from value Images to consider as cache sources (default [])
|
||||
--cgroup-parent string Optional parent cgroup for the container
|
||||
--compress Compress the build context using gzip
|
||||
--cpu-period int Limit the CPU CFS (Completely Fair Scheduler) period
|
||||
--cpu-quota int Limit the CPU CFS (Completely Fair Scheduler) quota
|
||||
-c, --cpu-shares int CPU shares (relative weight)
|
||||
|
|
@ -35,6 +37,7 @@ Options:
|
|||
--pull Always attempt to pull a newer version of the image
|
||||
-q, --quiet Suppress the build output and print image ID on success
|
||||
--rm Remove intermediate containers after a successful build (default true)
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size string Size of /dev/shm, default value is 64MB.
|
||||
The format is `<number><unit>`. `number` must be greater than `0`.
|
||||
Unit is optional and can be `b` (bytes), `k` (kilobytes), `m` (megabytes),
|
||||
|
|
@ -395,6 +398,12 @@ Dockerfile are echoed during the build process.
|
|||
For detailed information on using `ARG` and `ENV` instructions, see the
|
||||
[Dockerfile reference](../builder.md).
|
||||
|
||||
### Optional security options (--security-opt)
|
||||
|
||||
This flag is only supported on a daemon running on Windows, and only supports
|
||||
the `credentialspec` option. The `credentialspec` must be in the format
|
||||
`file://spec.txt` or `registry://keyname`.
|
||||
|
||||
### Specify isolation technology for container (--isolation)
|
||||
|
||||
This option is useful in situations where you are running Docker containers on
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
description: Docker's CLI command description and usage
|
||||
keywords:
|
||||
- Docker, Docker documentation, CLI, command line
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
weight: -2
|
||||
title: Use the Docker command line
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Use the Docker command line"
|
||||
description = "Docker's CLI command description and usage"
|
||||
keywords = ["Docker, Docker documentation, CLI, command line"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
weight = -2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Use the Docker command line
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ Options:
|
|||
--config=~/.docker Location of client config files
|
||||
-D, --debug Enable debug mode
|
||||
-H, --host=[] Daemon socket(s) to connect to
|
||||
-h, --help Print usage
|
||||
--help Print usage
|
||||
-l, --log-level=info Set the logging level
|
||||
--tls Use TLS; implied by --tlsverify
|
||||
--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA
|
||||
|
|
@ -143,18 +143,24 @@ Docker's client uses this property. If this property is not set, the client
|
|||
falls back to the default table format. For a list of supported formatting
|
||||
directives, see the [**Formatting** section in the `docker images` documentation](images.md)
|
||||
|
||||
The property `serviceInspectFormat` specifies the default format for `docker
|
||||
service inspect` output. When the `--format` flag is not provided with the
|
||||
`docker service inspect` command, Docker's client uses this property. If this
|
||||
property is not set, the client falls back to the default json format. For a
|
||||
list of supported formatting directives, see the
|
||||
[**Formatting** section in the `docker service inspect` documentation](service_inspect.md)
|
||||
|
||||
Following is a sample `config.json` file:
|
||||
|
||||
{% raw %}
|
||||
{
|
||||
"HttpHeaders": {
|
||||
"MyHeader": "MyValue"
|
||||
},
|
||||
"psFormat": "table {{.ID}}\\t{{.Image}}\\t{{.Command}}\\t{{.Labels}}",
|
||||
"imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}",
|
||||
"serviceInspectFormat": "pretty",
|
||||
"detachKeys": "ctrl-e,e"
|
||||
}
|
||||
{% endraw %}
|
||||
|
||||
### Notary
|
||||
|
||||
|
|
@ -176,8 +182,9 @@ To list the help on any command just execute the command, followed by the
|
|||
|
||||
Run a command in a new container
|
||||
|
||||
-a, --attach=[] Attach to STDIN, STDOUT or STDERR
|
||||
--cpu-shares=0 CPU shares (relative weight)
|
||||
Options:
|
||||
--add-host value Add a custom host-to-IP mapping (host:ip) (default [])
|
||||
-a, --attach value Attach to STDIN, STDOUT or STDERR (default [])
|
||||
...
|
||||
|
||||
## Option types
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: The commit command description and usage
|
||||
keywords:
|
||||
- commit, file, changes
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: commit
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "commit"
|
||||
description = "The commit command description and usage"
|
||||
keywords = ["commit, file, changes"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# commit
|
||||
|
||||
|
|
@ -55,7 +55,6 @@ created. Supported `Dockerfile` instructions:
|
|||
|
||||
## Commit a container with new configurations
|
||||
|
||||
{% raw %}
|
||||
$ docker ps
|
||||
ID IMAGE COMMAND CREATED STATUS PORTS
|
||||
c3f279d17e0a ubuntu:12.04 /bin/bash 7 days ago Up 25 hours
|
||||
|
|
@ -66,7 +65,6 @@ created. Supported `Dockerfile` instructions:
|
|||
f5283438590d
|
||||
$ docker inspect -f "{{ .Config.Env }}" f5283438590d
|
||||
[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
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
<!--[metadata]>
|
||||
+++
|
||||
title = "container prune"
|
||||
description = "Remove all stopped containers"
|
||||
keywords = [container, prune, delete, remove]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# container prune
|
||||
|
||||
```markdown
|
||||
Usage: docker container prune [OPTIONS]
|
||||
|
||||
Remove all stopped containers
|
||||
|
||||
Options:
|
||||
-f, --force Do not prompt for confirmation
|
||||
--help Print usage
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
$ docker container prune
|
||||
WARNING! This will remove all stopped containers.
|
||||
Are you sure you want to continue? [y/N] y
|
||||
Deleted Containers:
|
||||
4a7f7eebae0f63178aff7eb0aa39cd3f0627a203ab2df258c1a00b456cf20063
|
||||
f98f9c2aa1eaf727e4ec9c0283bc7d4aa4762fbdba7f26191f26c97f64090360
|
||||
|
||||
Total reclaimed space: 212 B
|
||||
```
|
||||
|
||||
## Related information
|
||||
|
||||
* [system df](system_df.md)
|
||||
* [volume prune](volume_prune.md)
|
||||
* [image prune](image_prune.md)
|
||||
* [system prune](system_prune.md)
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: The cp command description and usage
|
||||
keywords:
|
||||
- copy, container, files, folders
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: cp
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "cp"
|
||||
description = "The cp command description and usage"
|
||||
keywords = ["copy, container, files, folders"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# cp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
description: The create command description and usage
|
||||
keywords:
|
||||
- docker, create, container
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: create
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "create"
|
||||
description = "The create command description and usage"
|
||||
keywords = ["docker, create, container"]
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# create
|
||||
|
||||
|
|
@ -90,6 +90,7 @@ Options:
|
|||
--read-only Mount the container's root filesystem as read only
|
||||
--restart string Restart policy to apply when a container exits (default "no")
|
||||
Possible values are: no, on-failure[:max-retry], always, unless-stopped
|
||||
--rm Automatically remove the container when it exits
|
||||
--runtime string Runtime to use for this container
|
||||
--security-opt value Security Options (default [])
|
||||
--shm-size string Size of /dev/shm, default value is 64MB.
|
||||
|
|
@ -171,7 +172,7 @@ Set storage driver options per container.
|
|||
|
||||
This (size) will allow to set the container rootfs size to 120G at creation time.
|
||||
User cannot pass a size less than the Default BaseFS Size. This option is only
|
||||
available for the `devicemapper`, `btrfs`, and `zfs` graph drivers.
|
||||
available for the `devicemapper`, `btrfs`, `windowsfilter`, and `zfs` graph drivers.
|
||||
|
||||
### Specify isolation technology for container (--isolation)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
advisory: experimental
|
||||
description: The deploy command description and usage
|
||||
keywords:
|
||||
- stack, deploy
|
||||
menu:
|
||||
main:
|
||||
parent: smn_cli
|
||||
title: deploy
|
||||
---
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "deploy"
|
||||
description = "The deploy command description and usage"
|
||||
keywords = ["stack, deploy"]
|
||||
advisory = "experimental"
|
||||
[menu.main]
|
||||
parent = "smn_cli"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# stack deploy (experimental)
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue