diff --git a/docs/reference/api/README.md b/docs/reference/api/README.md index 3648522344..9c2c1b7407 100644 --- a/docs/reference/api/README.md +++ b/docs/reference/api/README.md @@ -1,8 +1,6 @@ - +--- +published: false +--- This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes: diff --git a/docs/reference/api/docker-io_api.md b/docs/reference/api/docker-io_api.md index 5e3c684484..a459fe83c1 100644 --- a/docs/reference/api/docker-io_api.md +++ b/docs/reference/api/docker-io_api.md @@ -1,16 +1,12 @@ - - -# Docker Hub API +--- +redirect_from: + - /reference/api/docker-io_api/ +description: API Documentation for the Docker Hub API +published: false +keywords: +- API, Docker, index, REST, documentation, Docker Hub, registry +title: Docker Hub API +--- This API is deprecated as of 1.7. To view the old version, see the [Docker Hub -API](https://docs.docker.com/v1.7/docker/reference/api/docker-io_api/) in the 1.7 documentation. +API](/v1.7/docker/reference/api/docker-io_api/) in the 1.7 documentation. diff --git a/docs/reference/api/docker_io_accounts_api.md b/docs/reference/api/docker_io_accounts_api.md index dfee194b19..881f14ade7 100644 --- a/docs/reference/api/docker_io_accounts_api.md +++ b/docs/reference/api/docker_io_accounts_api.md @@ -1,15 +1,11 @@ - - -# docker.io accounts API +--- +redirect_from: + - /reference/api/docker_io_accounts_api/ +description: API Documentation for docker.io accounts. +keywords: +- API, Docker, accounts, REST, documentation +title: Accounts API for docker.io +--- ## Get a single user diff --git a/docs/reference/api/docker_remote_api.md b/docs/reference/api/docker_remote_api.md index f090b90e4f..2b3c7265cf 100644 --- a/docs/reference/api/docker_remote_api.md +++ b/docs/reference/api/docker_remote_api.md @@ -1,15 +1,11 @@ - - -# Docker Remote API +--- +redirect_from: + - /reference/api/docker_remote_api/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API +--- Docker's Remote API uses an open schema model. In this model, unknown properties in incoming messages are ignored. Client applications need to take diff --git a/docs/reference/api/docker_remote_api_v1.18.md b/docs/reference/api/docker_remote_api_v1.18.md index aa884d03eb..91d6e32eb9 100644 --- a/docs/reference/api/docker_remote_api_v1.18.md +++ b/docs/reference/api/docker_remote_api_v1.18.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.18 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.18/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.18 +--- ## 1. Brief introduction @@ -523,7 +519,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -598,7 +596,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -729,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.18.md#create-a-container) for details. **Example request**: @@ -902,7 +902,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -928,7 +930,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.18.md#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`. @@ -982,7 +984,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1075,7 +1079,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1181,7 +1187,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -1785,7 +1793,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details. **Example request** @@ -1814,7 +1822,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details. **Example request** @@ -1837,7 +1845,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.18.md#image-tarball-format) for more details. **Example request** @@ -1942,7 +1950,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.19.md b/docs/reference/api/docker_remote_api_v1.19.md index 192c2aa8b7..e8ca7ee08f 100644 --- a/docs/reference/api/docker_remote_api_v1.19.md +++ b/docs/reference/api/docker_remote_api_v1.19.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.19 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.19/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.19 +--- ## 1. Brief introduction @@ -537,7 +533,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -614,7 +612,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -766,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.19.md#create-a-container) for details. **Example request**: @@ -939,7 +939,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -965,7 +967,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.19.md#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`. @@ -1019,7 +1021,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1112,7 +1116,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1223,7 +1229,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -1863,7 +1871,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details. **Example request** @@ -1892,7 +1900,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details. **Example request** @@ -1915,7 +1923,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.19.md#image-tarball-format) for more details. **Example request** @@ -2023,7 +2031,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.20.md b/docs/reference/api/docker_remote_api_v1.20.md index f88eedc3b0..df0fe685c1 100644 --- a/docs/reference/api/docker_remote_api_v1.20.md +++ b/docs/reference/api/docker_remote_api_v1.20.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.20 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.20/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.20 +--- ## 1. Brief introduction @@ -546,7 +542,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -623,7 +621,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -775,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.20.md#create-a-container) for details. **Example request**: @@ -948,7 +948,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -974,7 +976,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.20.md#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`. @@ -1028,7 +1030,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1123,7 +1127,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1169,7 +1175,9 @@ 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 @@ -1224,7 +1232,9 @@ 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**: @@ -1350,7 +1360,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2016,7 +2028,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details. **Example request** @@ -2045,7 +2057,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details. **Example request** @@ -2068,7 +2080,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.20.md#image-tarball-format) for more details. **Example request** @@ -2176,7 +2188,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.21.md b/docs/reference/api/docker_remote_api_v1.21.md index 4c6fc73f99..96efd0d520 100644 --- a/docs/reference/api/docker_remote_api_v1.21.md +++ b/docs/reference/api/docker_remote_api_v1.21.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.21 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.21/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.21 +--- ## 1. Brief introduction @@ -615,7 +611,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -692,7 +690,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -856,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.21.md#create-a-container) for details. **Example request**: @@ -1029,7 +1029,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1055,7 +1057,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.21.md#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`. @@ -1109,7 +1111,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1204,7 +1208,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1250,7 +1256,9 @@ 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 @@ -1305,7 +1313,9 @@ 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**: @@ -1431,7 +1441,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2170,7 +2182,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details. **Example request** @@ -2199,7 +2211,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details. **Example request** @@ -2222,7 +2234,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.21.md#image-tarball-format) for more details. **Example request** @@ -2334,7 +2346,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.22.md b/docs/reference/api/docker_remote_api_v1.22.md index ad7baddeb9..b613418c96 100644 --- a/docs/reference/api/docker_remote_api_v1.22.md +++ b/docs/reference/api/docker_remote_api_v1.22.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.22 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.22/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.22 +--- ## 1. Brief introduction @@ -740,7 +736,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -817,7 +815,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -981,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.22.md#create-a-container) for details. **Example request**: @@ -1200,7 +1200,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1230,7 +1232,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.22.md#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`. @@ -1284,7 +1286,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1382,7 +1386,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1428,7 +1434,9 @@ 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 @@ -1483,7 +1491,9 @@ 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**: @@ -1609,7 +1619,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2560,7 +2572,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details. **Example request** @@ -2589,7 +2601,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details. **Example request** @@ -2612,7 +2624,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.22.md#image-tarball-format) for more details. **Example request** @@ -2728,7 +2740,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.23.md b/docs/reference/api/docker_remote_api_v1.23.md index fecbf50109..1c53164055 100644 --- a/docs/reference/api/docker_remote_api_v1.23.md +++ b/docs/reference/api/docker_remote_api_v1.23.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.23 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.23/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.23 +--- ## 1. Brief introduction @@ -766,7 +762,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -843,7 +841,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1010,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](#create-a-container) for details. +> See [create a container](docker_remote_api_v1.23.md#create-a-container) for details. **Example request**: @@ -1233,7 +1233,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1263,7 +1265,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.23.md#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`. @@ -1317,7 +1319,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1415,7 +1419,9 @@ Copy files or folders of container `id` HTTP/1.1 200 OK Content-Type: application/x-tar + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1461,7 +1467,9 @@ 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 @@ -1516,7 +1524,9 @@ 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**: @@ -1642,7 +1652,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2608,7 +2620,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details. **Example request** @@ -2637,7 +2649,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details. **Example request** @@ -2660,7 +2672,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.23.md#image-tarball-format) for more details. **Example request** @@ -2684,7 +2696,7 @@ See the [image tarball format](#image-tarball-format) for more details. **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 as plain text once the action completes. @@ -2802,7 +2814,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: diff --git a/docs/reference/api/docker_remote_api_v1.24.md b/docs/reference/api/docker_remote_api_v1.24.md index 3625492e6d..e9803f1ea2 100644 --- a/docs/reference/api/docker_remote_api_v1.24.md +++ b/docs/reference/api/docker_remote_api_v1.24.md @@ -1,15 +1,11 @@ - - -# Docker Remote API v1.24 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.24/ +description: API Documentation for Docker +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.24 +--- # 1. Brief introduction @@ -798,7 +794,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -876,7 +874,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1262,7 +1262,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1292,7 +1294,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.24.md#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`. @@ -1346,7 +1348,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1460,7 +1464,9 @@ 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 @@ -1515,7 +1521,9 @@ 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**: @@ -1643,7 +1651,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2622,7 +2632,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details. **Example request** @@ -2651,7 +2661,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details. **Example request** @@ -2674,7 +2684,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.24.md#image-tarball-format) for more details. **Example request** @@ -2698,7 +2708,7 @@ See the [image tarball format](#image-tarball-format) for more details. **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 as plain text once the action completes. @@ -2816,7 +2826,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: @@ -2997,7 +3009,7 @@ Create a volume **JSON fields in response**: -Refer to the [inspect a volume](#inspect-a-volume) section or details about the +Refer to the [inspect a volume](docker_remote_api_v1.24.md#inspect-a-volume) section or details about the JSON fields returned in the response. ### Inspect a volume @@ -3536,7 +3548,7 @@ Content-Type: application/json `POST /plugins/pull?name=` Pulls and installs a plugin. After the plugin is installed, it can be enabled -using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin). +using the [`POST /plugins/(plugin name)/enable` endpoint](docker_remote_api_v1.24.md#enable-a-plugin). **Example request**: @@ -3547,7 +3559,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](#create-an-image) section for more details. +an image](docker_remote_api_v1.24.md#create-an-image) section for more details. **Example response**: @@ -3827,7 +3839,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](#create-an-image) section for more details. +an image](docker_remote_api_v1.24.md#create-an-image) section for more details. **Example response**: @@ -4489,7 +4501,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](#create-an-image) section for more details. +image](docker_remote_api_v1.24.md#create-an-image) section for more details. **Example request**: @@ -4651,7 +4663,7 @@ image](#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](#create-an-image) + login information, or a token. Refer to the [create an image](docker_remote_api_v1.24.md#create-an-image) section for more details. @@ -4668,9 +4680,7 @@ Stop and remove the service `id` **Example response**: - HTTP/1.1 200 OK - Content-Length: 0 - Content-Type: text/plain; charset=utf-8 + HTTP/1.1 200 No Content **Status codes**: @@ -4775,7 +4785,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](#create-an-image) section for more details. +image](docker_remote_api_v1.24.md#create-an-image) section for more details. **Example request**: @@ -4891,7 +4901,7 @@ image](#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](#create-an-image) + login information, or a token. Refer to the [create an image](docker_remote_api_v1.24.md#create-an-image) section for more details. **Status codes**: diff --git a/docs/reference/api/docker_remote_api_v1.25.md b/docs/reference/api/docker_remote_api_v1.25.md index 397b587a1b..dce8a166bd 100644 --- a/docs/reference/api/docker_remote_api_v1.25.md +++ b/docs/reference/api/docker_remote_api_v1.25.md @@ -1,16 +1,12 @@ - - -# Docker Remote API v1.25 +--- +redirect_from: + - /reference/api/docker_remote_api_v1.25/ +description: API Documentation for Docker +published: false +keywords: +- API, Docker, rcli, REST, documentation +title: Docker Remote API v1.25 +--- # 1. Brief introduction @@ -805,7 +801,9 @@ Get `stdout` and `stderr` logs from the container ``id`` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -883,7 +881,9 @@ Export the contents of container `id` HTTP/1.1 200 OK Content-Type: application/octet-stream + {% raw %} {{ TAR STREAM }} + {% endraw %} **Status codes**: @@ -1269,7 +1269,9 @@ Attach to the container `id` Connection: Upgrade Upgrade: tcp + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1299,7 +1301,7 @@ Attach to the container `id` When using the TTY setting is enabled in [`POST /containers/create` -](#create-a-container), +](docker_remote_api_v1.25.md#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`. @@ -1353,7 +1355,9 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet **Example response** + {% raw %} {{ STREAM }} + {% endraw %} **Query parameters**: @@ -1467,7 +1471,9 @@ 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 @@ -1522,7 +1528,9 @@ 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**: @@ -1650,7 +1658,9 @@ Build an image from a Dockerfile POST /build HTTP/1.1 + {% raw %} {{ TAR STREAM }} + {% endraw %} **Example response**: @@ -2638,7 +2648,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details. **Example request** @@ -2667,7 +2677,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](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details. **Example request** @@ -2690,7 +2700,7 @@ See the [image tarball format](#image-tarball-format) for more details. `POST /images/load` Load a set of images and tags into a Docker repository. -See the [image tarball format](#image-tarball-format) for more details. +See the [image tarball format](docker_remote_api_v1.25.md#image-tarball-format) for more details. **Example request** @@ -2832,7 +2842,9 @@ interactive session with the `exec` command. HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream + {% raw %} {{ STREAM }} + {% endraw %} **JSON parameters**: @@ -3016,7 +3028,7 @@ Create a volume **JSON fields in response**: -Refer to the [inspect a volume](#inspect-a-volume) section or details about the +Refer to the [inspect a volume](docker_remote_api_v1.25.md#inspect-a-volume) section or details about the JSON fields returned in the response. ### Inspect a volume @@ -3555,7 +3567,7 @@ Content-Type: application/json `POST /plugins/pull?name=` Pulls and installs a plugin. After the plugin is installed, it can be enabled -using the [`POST /plugins/(plugin name)/enable` endpoint](#enable-a-plugin). +using the [`POST /plugins/(plugin name)/enable` endpoint](docker_remote_api_v1.25.md#enable-a-plugin). **Example request**: @@ -3566,7 +3578,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](#create-an-image) section for more details. +an image](docker_remote_api_v1.25.md#create-an-image) section for more details. **Example response**: @@ -3863,7 +3875,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](#create-an-image) section for more details. +an image](docker_remote_api_v1.25.md#create-an-image) section for more details. **Example response**: @@ -4525,7 +4537,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](#create-an-image) section for more details. +image](docker_remote_api_v1.25.md#create-an-image) section for more details. **Example request**: @@ -4687,7 +4699,7 @@ image](#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](#create-an-image) + login information, or a token. Refer to the [create an image](docker_remote_api_v1.25.md#create-an-image) section for more details. @@ -4704,9 +4716,7 @@ Stop and remove the service `id` **Example response**: - HTTP/1.1 200 OK - Content-Length: 0 - Content-Type: text/plain; charset=utf-8 + HTTP/1.1 200 No Content **Status codes**: @@ -4811,7 +4821,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](#create-an-image) section for more details. +image](docker_remote_api_v1.25.md#create-an-image) section for more details. **Example request**: @@ -4927,7 +4937,7 @@ image](#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](#create-an-image) + login information, or a token. Refer to the [create an image](docker_remote_api_v1.25.md#create-an-image) section for more details. **Status codes**: diff --git a/docs/reference/api/hub_registry_spec.md b/docs/reference/api/hub_registry_spec.md index 87c4c88482..31c3596818 100644 --- a/docs/reference/api/hub_registry_spec.md +++ b/docs/reference/api/hub_registry_spec.md @@ -1,18 +1,15 @@ - - -# The Docker Hub and the Registry v1 +--- +redirect_from: + - /reference/api/hub_registry_spec/ +description: Documentation for docker Registry and Registry API +published: false +keywords: +- docker, registry, api, hub +title: Docker Hub and Registry v1 +--- This API is deprecated as of 1.7. To view the old version, see the [go -here](https://docs.docker.com/v1.7/docker/reference/api/hub_registry_spec/) in +here](/v1.7/docker/reference/api/hub_registry_spec/) in the 1.7 documentation. If you want an overview of the current features in Docker Hub or other image management features see the [image management overview](../../userguide/eng-image/image_management.md) in the current documentation set. diff --git a/docs/reference/api/index.md b/docs/reference/api/index.md index 05f3d126f2..cd81c6b3fc 100644 --- a/docs/reference/api/index.md +++ b/docs/reference/api/index.md @@ -1,16 +1,11 @@ - - - -# API Reference +--- +redirect_from: + - /reference/api/ +description: Reference +keywords: +- Engine +title: API reference +--- * [Docker Remote API](docker_remote_api.md) * [Docker Remote API client libraries](remote_api_client_libraries.md) diff --git a/docs/reference/api/remote_api_client_libraries.md b/docs/reference/api/remote_api_client_libraries.md index 03123d61ab..fd3a362afb 100644 --- a/docs/reference/api/remote_api_client_libraries.md +++ b/docs/reference/api/remote_api_client_libraries.md @@ -1,15 +1,11 @@ - - -# Docker Remote API client libraries +--- +redirect_from: + - /reference/api/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 +title: Docker Remote API client libraries +--- These libraries make it easier to build applications on top of the Docker Remote API with various programming languages. They have not been tested by the @@ -52,8 +48,8 @@ with the library maintainers. Go - engine-api - https://github.com/docker/engine-api + Docker Go client + https://godoc.org/github.com/docker/docker/client Gradle diff --git a/docs/reference/builder.md b/docs/reference/builder.md index 3434c1b43f..fd0ad3c394 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -1,15 +1,11 @@ - - -# Dockerfile reference +--- +redirect_from: + - /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 +title: Dockerfile reference +--- Docker can build images automatically by reading the instructions from a `Dockerfile`. A `Dockerfile` is a text document that contains all the commands a @@ -50,7 +46,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](#dockerignore-file) see the documentation on this page. +file](builder.md#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 @@ -298,7 +294,7 @@ Results in: ## Environment replacement -Environment variables (declared with [the `ENV` statement](#env)) can also be +Environment variables (declared with [the `ENV` statement](builder.md#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. @@ -502,7 +498,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 comitted image will be +current image and commit the results. The resulting committed image will be used for the next step in the `Dockerfile`. Layering `RUN` instructions and generating commits conforms to the core @@ -564,7 +560,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](#add) for details. +[below](builder.md#add) for details. ### Known issues (RUN) @@ -633,7 +629,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*](#entrypoint). +[*ENTRYPOINT*](builder.md#entrypoint). If the user specifies arguments to `docker run` then they will override the default specified in `CMD`. @@ -711,7 +707,7 @@ feature](../userguide/networking/index.md)). The `ENV` instruction sets the environment variable `` to the value ``. This value will be in the environment of all "descendant" -`Dockerfile` commands and can be [replaced inline](#environment-replacement) in +`Dockerfile` commands and can be [replaced inline](builder.md#environment-replacement) in many as well. The `ENV` instruction has two forms. The first form, `ENV `, @@ -1247,9 +1243,9 @@ The output of the final `pwd` command in this `Dockerfile` would be ARG [=] 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 -=` 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 =` 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. @@ -1348,7 +1344,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.](#environment-replacement) +Dockerfile instructions.](builder.md#environment-replacement) Docker has a set of predefined `ARG` variables that you can use without a corresponding `ARG` instruction in the Dockerfile. @@ -1362,8 +1358,11 @@ corresponding `ARG` instruction in the Dockerfile. * `NO_PROXY` * `no_proxy` -To use these, simply pass them on the command line using the `--build-arg -=` flag. +To use these, simply pass them on the command line using the flag: + +``` +--build-arg = +``` ### Impact on build caching diff --git a/docs/reference/commandline/attach.md b/docs/reference/commandline/attach.md index d0b519840b..b8b5631dea 100644 --- a/docs/reference/commandline/attach.md +++ b/docs/reference/commandline/attach.md @@ -1,14 +1,11 @@ - - -# attach +--- +redirect_from: + - /reference/commandline/attach/ +description: The attach command description and usage +keywords: +- attach, running, container +title: docker attach +--- ```markdown Usage: docker attach [OPTIONS] CONTAINER @@ -42,13 +39,13 @@ the container. You can detach from a container and leave it running using the It is forbidden to redirect the standard input of a `docker attach` command while attaching to a tty-enabled container (i.e.: launched with `-t`). -While a client is connected to container's stdio using `docker attach`, Docker -uses a ~1MB memory buffer to maximize the throughput of the application. If -this buffer is filled, the speed of the API connection will start to have an -effect on the process output writing speed. This is similar to other -applications like SSH. Because of this, it is not recommended to run -performance critical applications that generate a lot of output in the -foreground over a slow client connection. Instead, users should use the +While a client is connected to container's stdio using `docker attach`, Docker +uses a ~1MB memory buffer to maximize the throughput of the application. If +this buffer is filled, the speed of the API connection will start to have an +effect on the process output writing speed. This is similar to other +applications like SSH. Because of this, it is not recommended to run +performance critical applications that generate a lot of output in the +foreground over a slow client connection. Instead, users should use the `docker logs` command to get access to the logs. diff --git a/docs/reference/commandline/build.md b/docs/reference/commandline/build.md index 0f700c7a20..6d0380cdc0 100644 --- a/docs/reference/commandline/build.md +++ b/docs/reference/commandline/build.md @@ -1,14 +1,11 @@ - - -# build +--- +redirect_from: + - /reference/commandline/build/ +description: The build command description and usage +keywords: +- build, docker, image +title: docker build +--- ```markdown Usage: docker build [OPTIONS] PATH | URL | - @@ -94,11 +91,9 @@ Build Syntax Suffix | Commit Used | Build Context Used If you pass an URL to a remote tarball, the URL itself is sent to the daemon: -Instead of specifying a context, you can pass a single Dockerfile in the `URL` -or pipe the file in via `STDIN`. To pipe a Dockerfile from `STDIN`: - ```bash $ docker build http://server/context.tar.gz +``` The download operation will be performed on the host the Docker daemon is running on, which is not necessarily the same host from which the build command diff --git a/docs/reference/commandline/cli.md b/docs/reference/commandline/cli.md index 746b84b03a..99d39cafb4 100644 --- a/docs/reference/commandline/cli.md +++ b/docs/reference/commandline/cli.md @@ -1,15 +1,11 @@ - - -# Use the Docker command line +--- +redirect_from: + - /reference/commandline/cli/ +description: Docker's CLI command description and usage +keywords: +- Docker, Docker documentation, CLI, command line +title: Use the Docker Engine command-line +--- To list available commands, either run `docker` with no parameters or execute `docker help`: @@ -122,7 +118,7 @@ directives, see the Once attached to a container, users detach from it and leave it running using the using `CTRL-p CTRL-q` key sequence. This detach key sequence is customizable using the `detachKeys` property. Specify a `` value for the -property. The format of the `` is a comma-separated list of either +property. The format of the `` is a comma-separated list of either a letter [a-Z], or the `ctrl-` combined with any of the following: * `a-z` (a single lowercase alpha character ) @@ -145,6 +141,7 @@ directives, see the [**Formatting** section in the `docker images` documentation Following is a sample `config.json` file: + {% raw %} { "HttpHeaders": { "MyHeader": "MyValue" @@ -153,6 +150,7 @@ Following is a sample `config.json` file: "imagesFormat": "table {{.ID}}\\t{{.Repository}}\\t{{.Tag}}\\t{{.CreatedAt}}", "detachKeys": "ctrl-e,e" } + {% endraw %} ### Notary diff --git a/docs/reference/commandline/commit.md b/docs/reference/commandline/commit.md index acfb7c95be..d7d24400f4 100644 --- a/docs/reference/commandline/commit.md +++ b/docs/reference/commandline/commit.md @@ -1,14 +1,11 @@ - - -# commit +--- +redirect_from: + - /reference/commandline/commit/ +description: The commit command description and usage +keywords: +- commit, file, changes +title: docker commit +--- ```markdown Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] @@ -55,6 +52,7 @@ 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 @@ -65,8 +63,9 @@ 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 +## Commit a container with new `CMD` and `EXPOSE` instructions $ docker ps ID IMAGE COMMAND CREATED STATUS PORTS @@ -75,7 +74,7 @@ created. Supported `Dockerfile` instructions: $ docker commit --change='CMD ["apachectl", "-DFOREGROUND"]' -c "EXPOSE 80" c3f279d17e0a svendowideit/testimage:version4 f5283438590d - + $ docker run -d svendowideit/testimage:version4 89373736e2e7f00bc149bd783073ac43d0507da250e999f3f1036e0db60817c0 diff --git a/docs/reference/commandline/cp.md b/docs/reference/commandline/cp.md index b3a0b78916..eaec5a3d2b 100644 --- a/docs/reference/commandline/cp.md +++ b/docs/reference/commandline/cp.md @@ -1,14 +1,11 @@ - - -# cp +--- +redirect_from: + - /reference/commandline/cp/ +description: The cp command description and usage +keywords: +- copy, container, files, folders +title: docker cp +--- ```markdown Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|- @@ -33,7 +30,7 @@ either the `SRC_PATH` or `DEST_PATH`, you can also stream a tar archive from `STDIN` or to `STDOUT`. The `CONTAINER` can be a running or stopped container. The `SRC_PATH` or `DEST_PATH` can be a file or directory. -The `docker cp` command assumes container paths are relative to the container's +The `docker cp` command assumes container paths are relative to the container's `/` (root) directory. This means supplying the initial forward slash is optional; The command sees `compassionate_darwin:/tmp/foo/myfile.txt` and `compassionate_darwin:tmp/foo/myfile.txt` as identical. Local machine paths can @@ -78,7 +75,7 @@ argument of `DEST_PATH`, the behavior is as follows: The command requires `SRC_PATH` and `DEST_PATH` to exist according to the above rules. If `SRC_PATH` is local and is a symbolic link, the symbolic link, not -the target, is copied by default. To copy the link target and not the link, specify +the target, is copied by default. To copy the link target and not the link, specify the `-L` option. A colon (`:`) is used as a delimiter between `CONTAINER` and its path. You can diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 8a4a8ad164..e5efb92c9c 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -1,14 +1,11 @@ - - -# create +--- +redirect_from: + - /reference/commandline/create/ +description: The create command description and usage +keywords: +- docker, create, container +title: docker create +--- Creates a new container. @@ -169,8 +166,8 @@ Set storage driver options per container. $ docker create -it --storage-opt size=120G fedora /bin/bash -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 +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. ### Specify isolation technology for container (--isolation) diff --git a/docs/reference/commandline/deploy.md b/docs/reference/commandline/deploy.md index 908131e4bb..34cf39882f 100644 --- a/docs/reference/commandline/deploy.md +++ b/docs/reference/commandline/deploy.md @@ -1,15 +1,12 @@ - - -# stack deploy (experimental) +--- +redirect_from: + - /reference/commandline/deploy/ +advisory: experimental +description: The deploy command description and usage +keywords: +- stack, deploy +title: docker deploy +--- ```markdown Usage: docker deploy [OPTIONS] STACK diff --git a/docs/reference/commandline/diff.md b/docs/reference/commandline/diff.md index 8c01b8cdf2..4c82767bc1 100644 --- a/docs/reference/commandline/diff.md +++ b/docs/reference/commandline/diff.md @@ -1,14 +1,11 @@ - - -# diff +--- +redirect_from: + - /reference/commandline/diff/ +description: The diff command description and usage +keywords: +- list, changed, files, container +title: docker diff +--- ```markdown Usage: docker diff CONTAINER diff --git a/docs/reference/commandline/dockerd.md b/docs/reference/commandline/dockerd.md index 835e3114e8..3de313eee4 100644 --- a/docs/reference/commandline/dockerd.md +++ b/docs/reference/commandline/dockerd.md @@ -1,16 +1,13 @@ - - -# daemon +--- +redirect_from: +- /reference/commandline/dockerd/ +- /reference/commandline/daemon/ +- /engine/reference/commandline/daemon/ +description: The daemon command description and usage +keywords: +- container, daemon, runtime +title: dockerd +--- ```markdown Usage: dockerd [OPTIONS] @@ -236,7 +233,7 @@ snapshots. For each devicemapper graph location – typically `/var/lib/docker/devicemapper` – a thin pool is created based on two block devices, one for data and one for metadata. By default, these block devices are created automatically by using loopback mounts of automatically created -sparse files. Refer to [Storage driver options](#storage-driver-options) below +sparse files. Refer to [Storage driver options](dockerd.md#storage-driver-options) below for a way how to customize this setup. [~jpetazzo/Resizing Docker containers with the Device Mapper plugin](http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/) article explains how to tune your existing setup without the use of options. @@ -248,7 +245,7 @@ does not share executable memory between devices. Use The `zfs` driver is probably not as fast as `btrfs` but has a longer track record on stability. Thanks to `Single Copy ARC` shared blocks between clones will be cached only once. Use `dockerd -s zfs`. To select a different zfs filesystem -set `zfs.fsname` option as described in [Storage driver options](#storage-driver-options). +set `zfs.fsname` option as described in [Storage driver options](dockerd.md#storage-driver-options). The `overlay` is a very fast union filesystem. It is now merged in the main Linux kernel as of [3.18.0](https://lkml.org/lkml/2014/10/26/137). `overlay` @@ -280,7 +277,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. #### Devicemapper options -* `dm.thinpooldev` +* `dm.thinpooldev` Specifies a custom block storage device to use for the thin pool. @@ -307,7 +304,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.thinpooldev=/dev/mapper/thin-pool ``` -* `dm.basesize` +* `dm.basesize` Specifies the size to use when creating the base device, which limits the size of images and containers. The default value is 10G. Note, thin devices @@ -325,7 +322,6 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.basesize=50G ``` - This will increase the base device size to 50G. The Docker daemon will throw an error if existing base device size is larger than 50G. A user can use this option to expand the base device size however shrinking is not permitted. @@ -346,7 +342,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.basesize=20G ``` -* `dm.loopdatasize` +* `dm.loopdatasize` > **Note**: > This option configures devicemapper loopback, which should not @@ -363,7 +359,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.loopdatasize=200G ``` -* `dm.loopmetadatasize` +* `dm.loopmetadatasize` > **Note**: > This option configures devicemapper loopback, which should not @@ -380,7 +376,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.loopmetadatasize=4G ``` -* `dm.fs` +* `dm.fs` Specifies the filesystem type to use for the base device. The supported options are "ext4" and "xfs". The default is "xfs" @@ -391,7 +387,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.fs=ext4 ``` -* `dm.mkfsarg` +* `dm.mkfsarg` Specifies extra mkfs arguments to be used when creating the base device. @@ -401,7 +397,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt "dm.mkfsarg=-O ^has_journal" ``` -* `dm.mountopt` +* `dm.mountopt` Specifies extra mount options used when mounting the thin devices. @@ -411,7 +407,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.mountopt=nodiscard ``` -* `dm.datadev` +* `dm.datadev` (Deprecated, use `dm.thinpooldev`) @@ -429,7 +425,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. --storage-opt dm.metadatadev=/dev/sdc1 ``` -* `dm.metadatadev` +* `dm.metadatadev` (Deprecated, use `dm.thinpooldev`) @@ -453,7 +449,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. --storage-opt dm.metadatadev=/dev/sdc1 ``` -* `dm.blocksize` +* `dm.blocksize` Specifies a custom blocksize to use for the thin pool. The default blocksize is 64K. @@ -464,7 +460,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.blocksize=512K ``` -* `dm.blkdiscard` +* `dm.blkdiscard` Enables or disables the use of blkdiscard when removing devicemapper devices. This is enabled by default (only) if using loopback devices and is @@ -480,7 +476,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.blkdiscard=false ``` -* `dm.override_udev_sync_check` +* `dm.override_udev_sync_check` Overrides the `udev` synchronization checks between `devicemapper` and `udev`. `udev` is the device manager for the Linux kernel. @@ -520,7 +516,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. > Otherwise, set this flag for migrating existing Docker daemons to > a daemon with a supported environment. -* `dm.use_deferred_removal` +* `dm.use_deferred_removal` Enables use of deferred device removal if `libdm` and the kernel driver support the mechanism. @@ -542,7 +538,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. $ sudo dockerd --storage-opt dm.use_deferred_removal=true ``` -* `dm.use_deferred_deletion` +* `dm.use_deferred_deletion` Enables use of deferred device deletion for thin pool devices. By default, thin pool device deletion is synchronous. Before a container is deleted, @@ -568,7 +564,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. when unintentional leaking of mount point happens across multiple mount namespaces. -* `dm.min_free_space` +* `dm.min_free_space` Specifies the min free space percent in a thin pool require for new device creation to succeed. This check applies to both free data space as well @@ -600,7 +596,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. #### ZFS options -* `zfs.fsname` +* `zfs.fsname` Set zfs filesystem under which docker will create its own datasets. By default docker will pick up the zfs filesystem where docker graph @@ -614,9 +610,9 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. #### Btrfs options -* `btrfs.min_space` +* `btrfs.min_space` - Specifies the mininum size to use when creating the subvolume which is used + Specifies the minimum size to use when creating the subvolume which is used for containers. If user uses disk quota for btrfs when creating or running a container with **--storage-opt size** option, docker should ensure the **size** cannot be smaller than **btrfs.min_space**. @@ -629,7 +625,7 @@ options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`. #### Overlay2 options -* `overlay2.override_kernel_check` +* `overlay2.override_kernel_check` Overrides the Linux kernel version check allowing overlay2. Support for specifying multiple lower directories needed by overlay2 was added to the @@ -657,19 +653,20 @@ Runtimes can be registered with the daemon either via the configuration file or using the `--add-runtime` command line argument. The following is an example adding 2 runtimes via the configuration: + ```json - "default-runtime": "runc", - "runtimes": { - "runc": { - "path": "runc" - }, - "custom": { - "path": "/usr/local/bin/my-runc-replacement", - "runtimeArgs": [ - "--debug" - ] - } +"default-runtime": "runc", +"runtimes": { + "runc": { + "path": "runc" + }, + "custom": { + "path": "/usr/local/bin/my-runc-replacement", + "runtimeArgs": [ + "--debug" + ] } +} ``` This is the same example via the command line: @@ -829,35 +826,35 @@ $ sudo dockerd \ The currently supported cluster store options are: -* `discovery.heartbeat` +* `discovery.heartbeat` Specifies the heartbeat timer in seconds which is used by the daemon as a keepalive mechanism to make sure discovery module treats the node as alive in the cluster. If not configured, the default value is 20 seconds. -* `discovery.ttl` +* `discovery.ttl` Specifies the ttl (time-to-live) in seconds which is used by the discovery module to timeout a node if a valid heartbeat is not received within the configured ttl value. If not configured, the default value is 60 seconds. -* `kv.cacertfile` +* `kv.cacertfile` Specifies the path to a local file with PEM encoded CA certificates to trust -* `kv.certfile` +* `kv.certfile` Specifies the path to a local file with a PEM encoded certificate. This certificate is used as the client cert for communication with the Key/Value store. -* `kv.keyfile` +* `kv.keyfile` Specifies the path to a local file with a PEM encoded private key. This private key is used as the client key for communication with the Key/Value store. -* `kv.path` +* `kv.path` Specifies the path in the Key/Value store. If not configured, the default value is 'docker/nodes'. @@ -994,7 +991,7 @@ following algorithm to create the mapping ranges: If you enable user namespaces on the daemon, all containers are started with user namespaces enabled. In some situations you might want to disable this feature for a container, for example, to start a privileged container (see -[user namespace known restrictions](#user-namespace-known-restrictions)). +[user namespace known restrictions](dockerd.md#user-namespace-known-restrictions)). To enable those advanced features for a specific container use `--userns=host` in the `run/exec/create` command. This option will completely disable user namespace mapping for the container's user. @@ -1089,71 +1086,71 @@ This is a full example of the allowed configuration options on Linux: ```json { - "authorization-plugins": [], - "dns": [], - "dns-opts": [], - "dns-search": [], - "exec-opts": [], - "exec-root": "", - "storage-driver": "", - "storage-opts": [], - "labels": [], - "live-restore": true, - "log-driver": "", - "log-opts": {}, - "mtu": 0, - "pidfile": "", - "graph": "", - "cluster-store": "", - "cluster-store-opts": {}, - "cluster-advertise": "", - "max-concurrent-downloads": 3, - "max-concurrent-uploads": 5, - "debug": true, - "hosts": [], - "log-level": "", - "tls": true, - "tlsverify": true, - "tlscacert": "", - "tlscert": "", - "tlskey": "", - "swarm-default-advertise-addr": "", - "api-cors-header": "", - "selinux-enabled": false, - "userns-remap": "", - "group": "", - "cgroup-parent": "", - "default-ulimits": {}, - "ipv6": false, - "iptables": false, - "ip-forward": false, - "ip-masq": false, - "userland-proxy": false, - "ip": "0.0.0.0", - "bridge": "", - "bip": "", - "fixed-cidr": "", - "fixed-cidr-v6": "", - "default-gateway": "", - "default-gateway-v6": "", - "icc": false, - "raw-logs": false, - "registry-mirrors": [], - "insecure-registries": [], - "disable-legacy-registry": false, - "default-runtime": "runc", - "oom-score-adjust": -500, - "runtimes": { - "runc": { - "path": "runc" - }, - "custom": { - "path": "/usr/local/bin/my-runc-replacement", - "runtimeArgs": [ - "--debug" - ] - } - } + "api-cors-header": "", + "authorization-plugins": [], + "bip": "", + "bridge": "", + "cgroup-parent": "", + "cluster-store": "", + "cluster-store-opts": {}, + "cluster-advertise": "", + "debug": true, + "default-gateway": "", + "default-gateway-v6": "", + "default-runtime": "runc", + "default-ulimits": {}, + "disable-legacy-registry": false, + "dns": [], + "dns-opts": [], + "dns-search": [], + "exec-opts": [], + "exec-root": "", + "fixed-cidr": "", + "fixed-cidr-v6": "", + "graph": "", + "group": "", + "hosts": [], + "icc": false, + "insecure-registries": [], + "ip": "0.0.0.0", + "iptables": false, + "ipv6": false, + "ip-forward": false, + "ip-masq": false, + "labels": [], + "live-restore": true, + "log-driver": "", + "log-level": "", + "log-opts": {}, + "max-concurrent-downloads": 3, + "max-concurrent-uploads": 5, + "mtu": 0, + "oom-score-adjust": -500, + "pidfile": "", + "raw-logs": false, + "registry-mirrors": [], + "runtimes": { + "runc": { + "path": "runc" + }, + "custom": { + "path": "/usr/local/bin/my-runc-replacement", + "runtimeArgs": [ + "--debug" + ] + } + }, + "selinux-enabled": false, + "storage-driver": "", + "storage-opts": [], + "swarm-default-advertise-addr": "", + "tls": true, + "tlscacert": "", + "tlscert": "", + "tlskey": "", + "tlsverify": true, + "userland-proxy": false, + "userns-remap": "" } ``` @@ -1168,36 +1165,36 @@ This is a full example of the allowed configuration options on Windows: ```json { "authorization-plugins": [], + "bridge": "", + "cluster-advertise": "", + "cluster-store": "", + "debug": true, + "default-ulimits": {}, + "disable-legacy-registry": false, "dns": [], "dns-opts": [], "dns-search": [], "exec-opts": [], - "storage-driver": "", - "storage-opts": [], + "fixed-cidr": "", + "graph": "", + "group": "", + "hosts": [], + "insecure-registries": [], "labels": [], "live-restore": true, "log-driver": "", + "log-level": "", "mtu": 0, "pidfile": "", - "graph": "", - "cluster-store": "", - "cluster-advertise": "", - "debug": true, - "hosts": [], - "log-level": "", - "tlsverify": true, + "raw-logs": false, + "registry-mirrors": [], + "storage-driver": "", + "storage-opts": [], + "swarm-default-advertise-addr": "", "tlscacert": "", "tlscert": "", "tlskey": "", - "swarm-default-advertise-addr": "", - "group": "", - "default-ulimits": {}, - "bridge": "", - "fixed-cidr": "", - "raw-logs": false, - "registry-mirrors": [], - "insecure-registries": [], - "disable-legacy-registry": false + "tlsverify": true } ``` @@ -1244,7 +1241,7 @@ previously configured cluster configurations. This section describes how to run multiple Docker daemons on a single host. To run multiple daemons, you must configure each daemon so that it does not conflict with other daemons on the same host. You can set these options either -by providing them as flags, or by using a [daemon configuration file](#daemon-configuration-file). +by providing them as flags, or by using a [daemon configuration file](dockerd.md#daemon-configuration-file). The following daemon options must be configured for each daemon: diff --git a/docs/reference/commandline/events.md b/docs/reference/commandline/events.md index 1900d09c2b..b05aa8363d 100644 --- a/docs/reference/commandline/events.md +++ b/docs/reference/commandline/events.md @@ -1,14 +1,11 @@ - - -# events +--- +redirect_from: + - /reference/commandline/events/ +description: The events command description and usage +keywords: +- events, container, report +title: docker events +--- ```markdown Usage: docker events [OPTIONS] diff --git a/docs/reference/commandline/exec.md b/docs/reference/commandline/exec.md index a5e1d3c9c5..c2ad5f6349 100644 --- a/docs/reference/commandline/exec.md +++ b/docs/reference/commandline/exec.md @@ -1,14 +1,11 @@ - - -# exec +--- +redirect_from: + - /reference/commandline/exec/ +description: The exec command description and usage +keywords: +- command, container, run, execute +title: docker exec +--- ```markdown Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] diff --git a/docs/reference/commandline/export.md b/docs/reference/commandline/export.md index 54e6e01a6e..a1f628c410 100644 --- a/docs/reference/commandline/export.md +++ b/docs/reference/commandline/export.md @@ -1,14 +1,11 @@ - - -# export +--- +redirect_from: + - /reference/commandline/export/ +description: The export command description and usage +keywords: +- export, file, system, container +title: docker export +--- ```markdown Usage: docker export [OPTIONS] CONTAINER diff --git a/docs/reference/commandline/history.md b/docs/reference/commandline/history.md index 895fd55ea9..74fbcebdc9 100644 --- a/docs/reference/commandline/history.md +++ b/docs/reference/commandline/history.md @@ -1,14 +1,11 @@ - - -# history +--- +redirect_from: + - /reference/commandline/history/ +description: The history command description and usage +keywords: +- docker, image, history +title: docker history +--- ```markdown Usage: docker history [OPTIONS] IMAGE diff --git a/docs/reference/commandline/images.md b/docs/reference/commandline/images.md index af21a8197d..4338496f42 100644 --- a/docs/reference/commandline/images.md +++ b/docs/reference/commandline/images.md @@ -1,14 +1,11 @@ - - -# images +--- +redirect_from: + - /reference/commandline/images/ +description: The images command description and usage +keywords: +- list, docker, images +title: docker images +--- ```markdown Usage: docker images [OPTIONS] [REPOSITORY[:TAG]] @@ -249,6 +246,7 @@ output the data exactly as the template declares or, when using the The following example uses a template without headers and outputs the `ID` and `Repository` entries separated by a colon for all images: + {% raw %} $ docker images --format "{{.ID}}: {{.Repository}}" 77af4d6b9913: b6fa739cedf5: committ @@ -259,10 +257,12 @@ The following example uses a template without headers and outputs the 746b819f315e: postgres 746b819f315e: postgres 746b819f315e: postgres + {% endraw %} To list all images with their repository and tag in a table format you can use: + {% raw %} $ docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" IMAGE ID REPOSITORY TAG 77af4d6b9913 @@ -274,3 +274,4 @@ can use: 746b819f315e postgres 9.3 746b819f315e postgres 9.3.5 746b819f315e postgres latest + {% endraw %} diff --git a/docs/reference/commandline/import.md b/docs/reference/commandline/import.md index 2d2c88b4e8..297d382587 100644 --- a/docs/reference/commandline/import.md +++ b/docs/reference/commandline/import.md @@ -1,14 +1,11 @@ - - -# import +--- +redirect_from: + - /reference/commandline/import/ +description: The import command description and usage +keywords: +- import, file, system, container +title: docker import +--- ```markdown Usage: docker import [OPTIONS] file|URL|- [REPOSITORY[:TAG]] diff --git a/docs/reference/commandline/index.md b/docs/reference/commandline/index.md index eb8e96be7c..5437aa3350 100644 --- a/docs/reference/commandline/index.md +++ b/docs/reference/commandline/index.md @@ -1,18 +1,11 @@ - - - - -# The Docker commands +--- +redirect_from: + - /reference/commandline/ +description: Docker's CLI command description and usage +keywords: +- Docker, Docker documentation, CLI, command line +title: The Docker commands +--- This section contains reference information on using Docker's command line client. Each command has a reference page along with samples. If you are diff --git a/docs/reference/commandline/info.md b/docs/reference/commandline/info.md index 92fc5d343f..d7e18a9066 100644 --- a/docs/reference/commandline/info.md +++ b/docs/reference/commandline/info.md @@ -1,14 +1,11 @@ - - -# info +--- +redirect_from: + - /reference/commandline/info/ +description: The info command description and usage +keywords: +- display, docker, information +title: docker info +--- ```markdown Usage: docker info @@ -54,7 +51,7 @@ storage driver and a node that is part of a 2-node swarm: Plugins: Volume: local Network: bridge null host overlay - Swarm: + Swarm: NodeID: 0gac67oclbxq7 Is Manager: true Managers: 2 diff --git a/docs/reference/commandline/inspect.md b/docs/reference/commandline/inspect.md index 7ccc7f7392..1ad211c05e 100644 --- a/docs/reference/commandline/inspect.md +++ b/docs/reference/commandline/inspect.md @@ -1,14 +1,11 @@ - - -# inspect +--- +redirect_from: + - /reference/commandline/inspect/ +description: The inspect command description and usage +keywords: +- inspect, container, json +title: docker inspect +--- ```markdown Usage: docker inspect [OPTIONS] CONTAINER|IMAGE|TASK [CONTAINER|IMAGE|TASK...] @@ -36,29 +33,39 @@ describes all the details of the format. For the most part, you can pick out any field from the JSON in a fairly straightforward manner. + {% raw %} $ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $INSTANCE_ID + {% endraw %} **Get an instance's MAC address:** For the most part, you can pick out any field from the JSON in a fairly straightforward manner. + {% raw %} $ docker inspect --format='{{range .NetworkSettings.Networks}}{{.MacAddress}}{{end}}' $INSTANCE_ID + {% endraw %} **Get an instance's log path:** + {% raw %} $ docker inspect --format='{{.LogPath}}' $INSTANCE_ID + {% endraw %} **Get a Task's image name:** + {% raw %} $ docker inspect --format='{{.Container.Spec.Image}}' $INSTANCE_ID + {% endraw %} **List all port bindings:** One can loop over arrays and maps in the results to produce simple text output: + {% raw %} $ docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID + {% endraw %} **Find a specific port mapping:** @@ -70,7 +77,9 @@ numeric public port, you use `index` to find the specific port map, and then `index` 0 contains the first object inside of that. Then we ask for the `HostPort` field to get the public address. + {% raw %} $ docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID + {% endraw %} **Get a subsection in JSON format:** @@ -79,4 +88,6 @@ fields, by default you get a Go-style dump of the inner values. Docker adds a template function, `json`, which can be applied to get results in JSON format. + {% raw %} $ docker inspect --format='{{json .Config}}' $INSTANCE_ID + {% endraw %} diff --git a/docs/reference/commandline/kill.md b/docs/reference/commandline/kill.md index 55b11efad2..04b9d83792 100644 --- a/docs/reference/commandline/kill.md +++ b/docs/reference/commandline/kill.md @@ -1,14 +1,11 @@ - - -# kill +--- +redirect_from: + - /reference/commandline/kill/ +description: The kill command description and usage +keywords: +- container, kill, signal +title: docker kill +--- ```markdown Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/load.md b/docs/reference/commandline/load.md index be8ed05cf2..f73821dc7f 100644 --- a/docs/reference/commandline/load.md +++ b/docs/reference/commandline/load.md @@ -1,14 +1,11 @@ - - -# load +--- +redirect_from: + - /reference/commandline/load/ +description: The load command description and usage +keywords: +- stdin, tarred, repository +title: docker load +--- ```markdown Usage: docker load [OPTIONS] diff --git a/docs/reference/commandline/login.md b/docs/reference/commandline/login.md index 3308ae5d6b..7fe8d6a43e 100644 --- a/docs/reference/commandline/login.md +++ b/docs/reference/commandline/login.md @@ -1,14 +1,11 @@ - - -# login +--- +redirect_from: + - /reference/commandline/login/ +description: The login command description and usage +keywords: +- registry, login, image +title: docker login +--- ```markdown Usage: docker login [OPTIONS] [SERVER] @@ -32,7 +29,7 @@ adding the server name. `docker login` requires user to use `sudo` or be `root`, except when: 1. connecting to a remote daemon, such as a `docker-machine` provisioned `docker engine`. -2. user is added to the `docker` group. This will impact the security of your system; the `docker` group is `root` equivalent. See [Docker Daemon Attack Surface](https://docs.docker.com/security/security/#docker-daemon-attack-surface) for details. +2. user is added to the `docker` group. This will impact the security of your system; the `docker` group is `root` equivalent. See [Docker Daemon Attack Surface](/security/security/#docker-daemon-attack-surface) for details. You can log into any public or private repository for which you have credentials. When you log in, the command stores encoded credentials in @@ -52,12 +49,12 @@ This is the list of currently available credentials helpers and where you can download them from: - D-Bus Secret Service: https://github.com/docker/docker-credential-helpers/releases -- Apple OS X keychain: https://github.com/docker/docker-credential-helpers/releases +- Apple macOS keychain: https://github.com/docker/docker-credential-helpers/releases - Microsoft Windows Credential Manager: https://github.com/docker/docker-credential-helpers/releases ### Usage -You need to speficy the credentials store in `$HOME/.docker/config.json` +You need to specify the credentials store in `$HOME/.docker/config.json` to tell the docker engine to use it: ```json diff --git a/docs/reference/commandline/logout.md b/docs/reference/commandline/logout.md index a073b34f88..e5f55d7579 100644 --- a/docs/reference/commandline/logout.md +++ b/docs/reference/commandline/logout.md @@ -1,14 +1,11 @@ - - -# logout +--- +redirect_from: + - /reference/commandline/logout/ +description: The logout command description and usage +keywords: +- logout, docker, registry +title: docker logout +--- ```markdown Usage: docker logout [SERVER] diff --git a/docs/reference/commandline/logs.md b/docs/reference/commandline/logs.md index 437e709631..13bc2cd28c 100644 --- a/docs/reference/commandline/logs.md +++ b/docs/reference/commandline/logs.md @@ -1,14 +1,11 @@ - - -# logs +--- +redirect_from: + - /reference/commandline/logs/ +description: The logs command description and usage +keywords: +- logs, retrieve, docker +title: docker logs +--- ```markdown Usage: docker logs [OPTIONS] CONTAINER diff --git a/docs/reference/commandline/menu.md b/docs/reference/commandline/menu.md deleted file mode 100644 index 9ade86d26a..0000000000 --- a/docs/reference/commandline/menu.md +++ /dev/null @@ -1,26 +0,0 @@ - - - - -# The Docker commands - -This section contains reference information on using Docker's command line -client. Each command has a reference page along with samples. If you are -unfamiliar with the command line, you should start by reading about how to -[Use the Docker command line](cli.md). - -You start the Docker daemon with the command line. How you start the daemon -affects your Docker containers. For that reason you should also make sure to -read the [`dockerd`](dockerd.md) reference page. - -For a list of Docker commands see [Command line reference guide](index.md). diff --git a/docs/reference/commandline/network_connect.md b/docs/reference/commandline/network_connect.md index 5a9ed866ef..a4ef2ebb4f 100644 --- a/docs/reference/commandline/network_connect.md +++ b/docs/reference/commandline/network_connect.md @@ -1,14 +1,11 @@ - - -# network connect +--- +redirect_from: + - /reference/commandline/network_connect/ +description: The network connect command description and usage +keywords: +- network, connect, user-defined +title: docker network connect +--- ```markdown Usage: docker network connect [OPTIONS] NETWORK CONTAINER diff --git a/docs/reference/commandline/network_create.md b/docs/reference/commandline/network_create.md index 8ffed10972..6beb3ddf06 100644 --- a/docs/reference/commandline/network_create.md +++ b/docs/reference/commandline/network_create.md @@ -1,14 +1,11 @@ - - -# network create +--- +redirect_from: + - /reference/commandline/network_create/ +description: The network create command description and usage +keywords: +- network, create +title: docker network create +--- ```markdown Usage: docker network create [OPTIONS] NETWORK @@ -133,7 +130,7 @@ support it you can create multiple subnetworks. $ docker network create -d overlay \ --subnet=192.168.0.0/16 \ --subnet=192.170.0.0/16 \ - --gateway=192.168.0.100 \ + --gateway=192.168.0.100 \ --gateway=192.170.0.100 \ --ip-range=192.168.1.0/24 \ --aux-address="my-router=192.168.1.5" --aux-address="my-switch=192.168.1.6" \ diff --git a/docs/reference/commandline/network_disconnect.md b/docs/reference/commandline/network_disconnect.md index 2d43ccb1e9..8b49edaf6d 100644 --- a/docs/reference/commandline/network_disconnect.md +++ b/docs/reference/commandline/network_disconnect.md @@ -1,14 +1,11 @@ - - -# network disconnect +--- +redirect_from: + - /reference/commandline/network_disconnect/ +description: The network disconnect command description and usage +keywords: +- network, disconnect, user-defined +title: docker network disconnect +--- ```markdown Usage: docker network disconnect [OPTIONS] NETWORK CONTAINER diff --git a/docs/reference/commandline/network_inspect.md b/docs/reference/commandline/network_inspect.md index e28f38423e..173dd9c391 100644 --- a/docs/reference/commandline/network_inspect.md +++ b/docs/reference/commandline/network_inspect.md @@ -1,14 +1,11 @@ - - -# network inspect +--- +redirect_from: + - /reference/commandline/network_inspect/ +description: The network inspect command description and usage +keywords: +- network, inspect, user-defined +title: docker network inspect +--- ```markdown Usage: docker network inspect [OPTIONS] NETWORK [NETWORK...] diff --git a/docs/reference/commandline/network_ls.md b/docs/reference/commandline/network_ls.md index 3b321470e0..4143759b44 100644 --- a/docs/reference/commandline/network_ls.md +++ b/docs/reference/commandline/network_ls.md @@ -1,14 +1,11 @@ - - -# docker network ls +--- +redirect_from: + - /reference/commandline/network_ls/ +description: The network ls command description and usage +keywords: +- network, list, user-defined +title: docker network ls +--- ```markdown Usage: docker network ls [OPTIONS] diff --git a/docs/reference/commandline/network_rm.md b/docs/reference/commandline/network_rm.md index d57254636a..59e3e1ab87 100644 --- a/docs/reference/commandline/network_rm.md +++ b/docs/reference/commandline/network_rm.md @@ -1,14 +1,11 @@ - - -# network rm +--- +redirect_from: + - /reference/commandline/network_rm/ +description: the network rm command description and usage +keywords: +- network, rm, user-defined +title: docker network rm +--- ```markdown Usage: docker network rm NETWORK [NETWORK...] diff --git a/docs/reference/commandline/node_demote.md b/docs/reference/commandline/node_demote.md index 2cec22ac3b..e6ab0d6b4f 100644 --- a/docs/reference/commandline/node_demote.md +++ b/docs/reference/commandline/node_demote.md @@ -1,14 +1,11 @@ - - -# node demote +--- +redirect_from: + - /reference/commandline/node_demote/ +description: The node demote command description and usage +keywords: +- node, demote +title: docker node demote +--- ```markdown Usage: docker node demote NODE [NODE...] diff --git a/docs/reference/commandline/node_inspect.md b/docs/reference/commandline/node_inspect.md index d8e379bd89..ca94edb56b 100644 --- a/docs/reference/commandline/node_inspect.md +++ b/docs/reference/commandline/node_inspect.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/node_inspect/ +description: The node inspect command description and usage +keywords: +- node, inspect +title: docker node inspect +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# node inspect - ```markdown Usage: docker node inspect [OPTIONS] self|NODE [NODE...] @@ -95,8 +92,10 @@ Example output: } ] + {% raw %} $ docker node inspect --format '{{ .ManagerStatus.Leader }}' self false + {% endraw %} $ docker node inspect --pretty self ID: e216jshn25ckzbvmwlnh5jr3g diff --git a/docs/reference/commandline/node_ls.md b/docs/reference/commandline/node_ls.md index eb36f61ff3..d231a368de 100644 --- a/docs/reference/commandline/node_ls.md +++ b/docs/reference/commandline/node_ls.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/node_ls/ +description: The node ls command description and usage +keywords: +- node, list +title: docker node ls +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# node ls - ```markdown Usage: docker node ls [OPTIONS] @@ -26,7 +23,7 @@ Options: -q, --quiet Only display IDs ``` -Lists all the nodes that the Docker Swarm manager knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. +Lists all the nodes that the Docker Swarm manager knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](node_ls.md#filtering) section for more information about available filter options. Example output: diff --git a/docs/reference/commandline/node_promote.md b/docs/reference/commandline/node_promote.md index 7f5830d92a..4b50de1f36 100644 --- a/docs/reference/commandline/node_promote.md +++ b/docs/reference/commandline/node_promote.md @@ -1,14 +1,11 @@ - - -# node promote +--- +redirect_from: + - /reference/commandline/node_promote/ +description: The node promote command description and usage +keywords: +- node, promote +title: docker node promote +--- ```markdown Usage: docker node promote NODE [NODE...] diff --git a/docs/reference/commandline/node_ps.md b/docs/reference/commandline/node_ps.md index 06dc0c2489..d023f728d6 100644 --- a/docs/reference/commandline/node_ps.md +++ b/docs/reference/commandline/node_ps.md @@ -1,18 +1,16 @@ - +--- +redirect_from: + - /reference/commandline/node_ps/ + - /engine/reference/commandline/node_tasks/ +description: The node ps command description and usage +keywords: +- node, tasks +- ps +title: docker node ps +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# node ps - ```markdown Usage: docker node ps [OPTIONS] self|NODE @@ -25,7 +23,7 @@ Options: --no-resolve Do not map IDs to Names ``` -Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. +Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](node_ps.md#filtering) section for more information about available filter options. Example output: @@ -45,10 +43,10 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b The currently supported filters are: -* [name](#name) -* [id](#id) -* [label](#label) -* [desired-state](#desired-state) +* [name](node_ps.md#name) +* [id](node_ps.md#id) +* [label](node_ps.md#label) +* [desired-state](node_ps.md#desired-state) #### name diff --git a/docs/reference/commandline/node_rm.md b/docs/reference/commandline/node_rm.md index 36ff355ab9..757d6092fb 100644 --- a/docs/reference/commandline/node_rm.md +++ b/docs/reference/commandline/node_rm.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/node_rm/ +description: The node rm command description and usage +keywords: +- node, remove +title: docker node rm +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# node rm - ```markdown Usage: docker node rm [OPTIONS] NODE [NODE...] diff --git a/docs/reference/commandline/node_update.md b/docs/reference/commandline/node_update.md index dd89cae75c..e22b5cd0d4 100644 --- a/docs/reference/commandline/node_update.md +++ b/docs/reference/commandline/node_update.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/node_update/ +description: The node update command description and usage +keywords: +- resources, update, dynamically +title: docker node update +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -## update - ```markdown Usage: docker node update [OPTIONS] NODE diff --git a/docs/reference/commandline/pause.md b/docs/reference/commandline/pause.md index 629c6ed091..974f758d21 100644 --- a/docs/reference/commandline/pause.md +++ b/docs/reference/commandline/pause.md @@ -1,14 +1,11 @@ - - -# pause +--- +redirect_from: + - /reference/commandline/pause/ +description: The pause command description and usage +keywords: +- cgroups, container, suspend, SIGSTOP +title: docker pause +--- ```markdown Usage: docker pause CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/plugin_disable.md b/docs/reference/commandline/plugin_disable.md index ba64889545..49f7d6ae91 100644 --- a/docs/reference/commandline/plugin_disable.md +++ b/docs/reference/commandline/plugin_disable.md @@ -1,15 +1,12 @@ - - -# plugin disable (experimental) +--- +redirect_from: + - /reference/commandline/plugin_disable/ +advisory: experimental +description: the plugin disable command description and usage +keywords: +- plugin, disable +title: docker plugin disable (experimental) +--- ```markdown Usage: docker plugin disable PLUGIN diff --git a/docs/reference/commandline/plugin_enable.md b/docs/reference/commandline/plugin_enable.md index d8b69d46f0..e925154a2e 100644 --- a/docs/reference/commandline/plugin_enable.md +++ b/docs/reference/commandline/plugin_enable.md @@ -1,15 +1,12 @@ - - -# plugin enable (experimental) +--- +redirect_from: + - /reference/commandline/plugin_enable/ +advisory: experimental +description: the plugin enable command description and usage +keywords: +- plugin, enable +title: docker plugin enable (experimental) +--- ```markdown Usage: docker plugin enable PLUGIN diff --git a/docs/reference/commandline/plugin_inspect.md b/docs/reference/commandline/plugin_inspect.md old mode 100755 new mode 100644 index 555e3a983f..653efd9b26 --- a/docs/reference/commandline/plugin_inspect.md +++ b/docs/reference/commandline/plugin_inspect.md @@ -1,15 +1,12 @@ - - -# plugin inspect (experimental) +--- +redirect_from: + - /reference/commandline/plugin_inspect/ +advisory: experimental +description: The plugin inspect command description and usage +keywords: +- plugin, inspect +title: docker plugin inspect (experimental) +--- ```markdown Usage: docker plugin inspect [OPTIONS] PLUGIN [PLUGIN...] diff --git a/docs/reference/commandline/plugin_install.md b/docs/reference/commandline/plugin_install.md index 9084d84555..bd669f8370 100644 --- a/docs/reference/commandline/plugin_install.md +++ b/docs/reference/commandline/plugin_install.md @@ -1,15 +1,12 @@ - - -# plugin install (experimental) +--- +redirect_from: + - /reference/commandline/plugin_install/ +advisory: experimental +description: the plugin install command description and usage +keywords: +- plugin, install +title: docker plugin install (experimental) +--- ```markdown Usage: docker plugin install [OPTIONS] PLUGIN diff --git a/docs/reference/commandline/plugin_ls.md b/docs/reference/commandline/plugin_ls.md index 91ac98ae1d..b3b21b7913 100644 --- a/docs/reference/commandline/plugin_ls.md +++ b/docs/reference/commandline/plugin_ls.md @@ -1,15 +1,12 @@ - - -# plugin ls (experimental) +--- +redirect_from: + - /reference/commandline/plugin_ls/ +advisory: experimental +description: The plugin ls command description and usage +keywords: +- plugin, list +title: docker plugin ls (experimental) +--- ```markdown Usage: docker plugin ls diff --git a/docs/reference/commandline/plugin_rm.md b/docs/reference/commandline/plugin_rm.md index ddb12323cb..06b72928cf 100644 --- a/docs/reference/commandline/plugin_rm.md +++ b/docs/reference/commandline/plugin_rm.md @@ -1,15 +1,12 @@ - - -# plugin rm (experimental) +--- +redirect_from: + - /reference/commandline/plugin_rm/ +advisory: experimental +description: the plugin rm command description and usage +keywords: +- plugin, rm +title: docker plugin rm (experimental) +--- ```markdown Usage: docker plugin rm PLUGIN diff --git a/docs/reference/commandline/port.md b/docs/reference/commandline/port.md index e8da943c36..9f87dae92d 100644 --- a/docs/reference/commandline/port.md +++ b/docs/reference/commandline/port.md @@ -1,14 +1,11 @@ - - -# port +--- +redirect_from: + - /reference/commandline/port/ +description: The port command description and usage +keywords: +- port, mapping, container +title: docker port +--- ```markdown Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]] diff --git a/docs/reference/commandline/ps.md b/docs/reference/commandline/ps.md index 1ff3928cf4..5febadbe0b 100644 --- a/docs/reference/commandline/ps.md +++ b/docs/reference/commandline/ps.md @@ -1,14 +1,11 @@ - - -# ps +--- +redirect_from: + - /reference/commandline/ps/ +description: The ps command description and usage +keywords: +- container, running, list +title: docker ps +--- ```markdown Usage: docker ps [OPTIONS] @@ -148,6 +145,7 @@ $ docker ps -a --filter 'exited=137' CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3e1c0ed5bfe ubuntu:latest "sleep 1000" 12 seconds ago Exited (137) 5 seconds ago grave_kowalevski a2eb5558d669 redis:latest "/entrypoint.sh redi 2 hours ago Exited (137) 2 hours ago sharp_lalande +``` Any of these events result in a `137` status: @@ -274,7 +272,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS The `volume` filter shows only containers that mount a specific volume or have a volume mounted in a specific path: -```bash +```bash{% raw %} $ docker ps --filter volume=remote-volume --format "table {{.ID}}\t{{.Mounts}}" CONTAINER ID MOUNTS 9c3527ed70ce remote-volume @@ -282,7 +280,7 @@ CONTAINER ID MOUNTS $ docker ps --filter volume=/data --format "table {{.ID}}\t{{.Mounts}}" CONTAINER ID MOUNTS 9c3527ed70ce remote-volume -``` +{% endraw %}``` #### Network @@ -307,7 +305,9 @@ example shows all containers that are attached to the `net1` network, using the network id as a filter; ```bash +{% raw %} $ docker network inspect --format "{{.ID}}" net1 +{% endraw %} 8c0b4110ae930dbe26b258de9bc34a03f98056ed6f27f991d32919bfe401d7c5 @@ -336,7 +336,7 @@ Placeholder | Description `.Size` | Container disk size. `.Names` | Container names. `.Labels` | All labels assigned to the container. -`.Label` | Value of a specific label for this container. For example `'{{.Label "com.docker.swarm.cpu"}}'` +`.Label` | Value of a specific label for this container. For example `'{% raw %}{{.Label "com.docker.swarm.cpu"}}{% endraw %}'` `.Mounts` | Names of the volumes mounted in this container. When using the `--format` option, the `ps` command will either output the data @@ -347,7 +347,9 @@ The following example uses a template without headers and outputs the `ID` and `Command` entries separated by a colon for all running containers: ```bash +{% raw %} $ docker ps --format "{{.ID}}: {{.Command}}" +{% endraw %} a87ecb4f327c: /bin/sh -c #(nop) MA 01946d9d34d8: /bin/sh -c #(nop) MA @@ -358,7 +360,9 @@ c1d3b0166030: /bin/sh -c yum -y up To list all running containers with their labels in a table format you can use: ```bash +{% raw %} $ docker ps --format "table {{.ID}}\t{{.Labels}}" +{% endraw %} CONTAINER ID LABELS a87ecb4f327c com.docker.swarm.node=ubuntu,com.docker.swarm.storage=ssd diff --git a/docs/reference/commandline/pull.md b/docs/reference/commandline/pull.md index f10c134863..e664398e6f 100644 --- a/docs/reference/commandline/pull.md +++ b/docs/reference/commandline/pull.md @@ -1,14 +1,11 @@ - - -# pull +--- +redirect_from: + - /reference/commandline/pull/ +description: The pull command description and usage +keywords: +- pull, image, hub, docker +title: docker pull +--- ```markdown Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST] @@ -135,7 +132,7 @@ above, the digest of the image is: Docker also prints the digest of an image when *pushing* to a registry. This may be useful if you want to pin to a version of the image you just pushed. -A digest takes the place of the tag when pulling an image, for example, to +A digest takes the place of the tag when pulling an image, for example, to pull the above image by digest, run the following command: ```bash @@ -158,7 +155,7 @@ MAINTAINER some maintainer ``` > **Note**: Using this feature "pins" an image to a specific version in time. -> Docker will therefore not pull updated versions of an image, which may include +> Docker will therefore not pull updated versions of an image, which may include > security updates. If you want to pull an updated image, you need to change the > digest accordingly. diff --git a/docs/reference/commandline/push.md b/docs/reference/commandline/push.md index 9b70fd3516..035a121387 100644 --- a/docs/reference/commandline/push.md +++ b/docs/reference/commandline/push.md @@ -1,14 +1,11 @@ - - -# push +--- +redirect_from: + - /reference/commandline/push/ +description: The push command description and usage +keywords: +- share, push, image +title: docker push +--- ```markdown Usage: docker push [OPTIONS] NAME[:TAG] diff --git a/docs/reference/commandline/rename.md b/docs/reference/commandline/rename.md index f5a4fe23ec..7dd672474c 100644 --- a/docs/reference/commandline/rename.md +++ b/docs/reference/commandline/rename.md @@ -1,14 +1,11 @@ - - -# rename +--- +redirect_from: + - /reference/commandline/rename/ +description: The rename command description and usage +keywords: +- rename, docker, container +title: docker rename +--- ```markdown Usage: docker rename CONTAINER NEW_NAME diff --git a/docs/reference/commandline/restart.md b/docs/reference/commandline/restart.md index 661e16d4de..14df58e86d 100644 --- a/docs/reference/commandline/restart.md +++ b/docs/reference/commandline/restart.md @@ -1,19 +1,16 @@ - - -# restart +--- +redirect_from: + - /reference/commandline/restart/ +description: The restart command description and usage +keywords: +- restart, container, Docker +title: docker restart +--- ```markdown Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] -Restart a container +Restart one or more containers Options: --help Print usage diff --git a/docs/reference/commandline/rm.md b/docs/reference/commandline/rm.md index 319ef4dbbc..3d21eae80e 100644 --- a/docs/reference/commandline/rm.md +++ b/docs/reference/commandline/rm.md @@ -1,14 +1,11 @@ - - -# rm +--- +redirect_from: + - /reference/commandline/rm/ +description: The rm command description and usage +keywords: +- remove, Docker, container +title: docker rm +--- ```markdown Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/rmi.md b/docs/reference/commandline/rmi.md index 328d9fe140..759b67a858 100644 --- a/docs/reference/commandline/rmi.md +++ b/docs/reference/commandline/rmi.md @@ -1,14 +1,11 @@ - - -# rmi +--- +redirect_from: + - /reference/commandline/rmi/ +description: The rmi command description and usage +keywords: +- remove, image, Docker +title: docker rmi +--- ```markdown Usage: docker rmi [OPTIONS] IMAGE [IMAGE...] diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index f5e841dcec..3b5a28b2cb 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -1,14 +1,11 @@ - - -# run +--- +redirect_from: + - /reference/commandline/run/ +description: The run command description and usage +keywords: +- run, command, container +title: docker run +--- ```markdown Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] @@ -197,8 +194,8 @@ The `-w` lets the command being executed inside directory given, here $ docker run -it --storage-opt size=120G fedora /bin/bash -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 +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. ### Mount tmpfs (--tmpfs) @@ -661,7 +658,7 @@ network namespace, run this command: > **Note**: Not all sysctls are namespaced. Docker does not support changing sysctls -> inside of a container that also modify the host system. As the kernel +> inside of a container that also modify the host system. As the kernel > evolves we expect to see more sysctls become namespaced. #### Currently supported sysctls diff --git a/docs/reference/commandline/save.md b/docs/reference/commandline/save.md index f7d1fdedcb..1b666b8eb6 100644 --- a/docs/reference/commandline/save.md +++ b/docs/reference/commandline/save.md @@ -1,14 +1,11 @@ - - -# save +--- +redirect_from: + - /reference/commandline/save/ +description: The save command description and usage +keywords: +- tarred, repository, backup +title: docker save +--- ```markdown Usage: docker save [OPTIONS] IMAGE [IMAGE...] diff --git a/docs/reference/commandline/search.md b/docs/reference/commandline/search.md index 988db8bf1f..4c59b90cce 100644 --- a/docs/reference/commandline/search.md +++ b/docs/reference/commandline/search.md @@ -1,14 +1,11 @@ - - -# search +--- +redirect_from: + - /reference/commandline/search/ +description: The search command description and usage +keywords: +- search, hub, images +title: docker search +--- ```markdown Usage: docker search [OPTIONS] TERM @@ -41,7 +38,7 @@ This example displays images with a name containing 'busybox': $ docker search busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED - busybox Busybox base image. 316 [OK] + busybox Busybox base image. 316 [OK] progrium/busybox 50 [OK] radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK] odise/busybox-python 2 [OK] @@ -74,13 +71,13 @@ at least 3 stars and the description isn't truncated in the output: $ docker search --stars=3 --no-trunc busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED - busybox Busybox base image. 325 [OK] + busybox Busybox base image. 325 [OK] progrium/busybox 50 [OK] radial/busyboxplus Full-chain, Internet enabled, busybox made from scratch. Comes in git and cURL flavors. 8 [OK] ## Limit search results (--limit) -The flag `--limit` is the maximium number of results returned by a search. This value could +The flag `--limit` is the maximum number of results returned by a search. This value could be in the range between 1 and 100. The default value of `--limit` is 25. @@ -103,7 +100,7 @@ least 3 stars: $ docker search --filter stars=3 busybox NAME DESCRIPTION STARS OFFICIAL AUTOMATED - busybox Busybox base image. 325 [OK] + busybox Busybox base image. 325 [OK] progrium/busybox 50 [OK] radial/busyboxplus Full-chain, Internet enabled, busybox made... 8 [OK] diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index c576a49962..9a81e198a6 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_create/ +description: The service create command description and usage +keywords: +- service, create +title: docker service create +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service create - ```Markdown Usage: docker service create [OPTIONS] IMAGE [COMMAND] [ARG...] @@ -170,23 +167,52 @@ your web server containers when they start. To update the website, you just update the named volume. For more information about named volumes, see -[Data Volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). +[Data Volumes](/engine/tutorials/dockervolumes/). The following table describes options which apply to both bind-mounts and named volumes in a service: -| Option | Required | Description -|:-----------------------------------------|:--------------------------|:----------------------------------------------------------------------------------------- -| **type** | | The type of mount, can be either `volume`, or `bind`. Defaults to `volume` if no type is specified.
  • `volume`: mounts a [managed volume](volume_create.md) into the container.
  • `bind`: bind-mounts a directory or file from the host into the container.
-| **src** or **source** | for `type=bind` only |
  • `type=volume`: `src` is an optional way to specify the name of the volume (for example, `src=my-volume`). If the named volume does not exist, it is automatically created. If no `src` is specified, the volume is assigned a random name which is guaranteed to be unique on the host, but may not be unique cluster-wide. A randomly-named volume has the same lifecycle as its container and is destroyed when the *container* is destroyed (which is upon `service update`, or when scaling or re-balancing the service).
  • `type=bind`: `src` is required, and specifies an absolute path to the file or directory to bind-mount (for example, `src=/path/on/host/`). An error is produced if the file or directory does not exist.
-| **dst** or **destination** or **target** | yes | Mount path inside the container, for example `/some/path/in/container/`. If the path does not exist in the container's filesystem, the Engine creates a directory at the specified location before mounting the volume or bind-mount. -| **readonly** or **ro** | | The Engine mounts binds and volumes `read-write` unless `readonly` option is given when mounting the bind or volume.

  • `true` or `1` or no value: Mounts the bind or volume read-only.
  • `false` or `0`: Mounts the bind or volume read-write.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionRequiredDescription
typeThe type of mount, can be either volume, or bind. Defaults to volume if no type is specified.
  • volume: mounts a managed volume into the container.
  • bind: bind-mounts a directory or file from the host into the container.
src or sourcefor type=bind only
  • type=volume: src is an optional way to specify the name of the volume (for example, src=my-volume). If the named volume does not exist, it is automatically created. If no src is specified, the volume is assigned a random name which is guaranteed to be unique on the host, but may not be unique cluster-wide. A randomly-named volume has the same lifecycle as its container and is destroyed when the container is destroyed (which is upon service update, or when scaling or re-balancing the service).
  • type=bind: src is required, and specifies an absolute path to the file or directory to bind-mount (for example, src=/path/on/host/). An error is produced if the file or directory does not exist.
dst or destination or targetyesMount path inside the container, for example /some/path/in/container/. If the path does not exist in the container’s filesystem, the Engine creates a directory at the specified location before mounting the volume or bind-mount.
readonly or roThe Engine mounts binds and volumes read-write unless readonly option is given when mounting the bind or volume.

  • true or 1 or no value: Mounts the bind or volume read-only.
  • false or 0: Mounts the bind or volume read-write.
#### Bind Propagation Bind propagation refers to whether or not mounts created within a given bind-mount or named volume can be propagated to replicas of that mount. Consider -a mount point `/mnt`, which is also mounted on `/tmp`. The propation settings +a mount point `/mnt`, which is also mounted on `/tmp`. The propagation settings control whether a mount on `/tmp/a` would also be available on `/mnt/a`. Each propagation setting has a recursive counterpoint. In the case of recursion, consider that `/tmp/a` is also mounted as `/foo`. The propagation settings @@ -222,12 +248,37 @@ For more information about bind propagation, see the #### Options for Named Volumes The following options can only be used for named volumes (`type=volume`); -| Option | Description -|:----------------------|:-------------------------------------------------------------------------------------------------------------------- -| **volume-driver** | Name of the volume-driver plugin to use for the volume. Defaults to ``"local"``, to use the local volume driver to create the volume if the volume does not exist. -| **volume-label** | One or more custom metadata ("labels") to apply to the volume upon creation. For example, `volume-label=mylabel=hello-world,my-other-label=hello-mars`. For more information about labels, refer to [apply custom metadata](../../userguide/labels-custom-metadata.md). -| **volume-nocopy** | By default, if you attach an empty volume to a container, and files or directories already existed at the mount-path in the container (`dst`), the Engine copies those files and directories into the volume, allowing the host to access them. Set `volume-nocopy` to disables copying files from the container's filesystem to the volume and mount the empty volume.

A value is optional:
  • `true` or `1`: Default if you do not provide a value. Disables copying.
  • `false` or `0`: Enables copying.
-| **volume-opt** | Options specific to a given volume driver, which will be passed to the driver when creating the volume. Options are provided as a comma-separated list of key/value pairs, for example, `volume-opt=some-option=some-value,some-other-option=some-other-value`. For available options for a given driver, refer to that driver's documentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
volume-driverName of the volume-driver plugin to use for the volume. Defaults to "local", to use the local volume driver to create the volume if the volume does not exist.
volume-labelOne or more custom metadata (“labels”) to apply to the volume upon creation. For example, volume-label=mylabel=hello-world,my-other-label=hello-mars. For more information about labels, refer to apply custom metadata.
volume-nocopyBy default, if you attach an empty volume to a container, and files or directories already existed at the mount-path in the container (dst), the Engine copies those files and directories into the volume, allowing the host to access them. Set volume-nocopy to disables copying files from the container’s filesystem to the volume and mount the empty volume.

A value is optional:
  • true or 1: Default if you do not provide a value. Disables copying.
  • false or 0: Enables copying.
volume-optOptions specific to a given volume driver, which will be passed to the driver when creating the volume. Options are provided as a comma-separated list of key/value pairs, for example, volume-opt=some-option=some-value,some-other-option=some-other-value. For available options for a given driver, refer to that driver’s documentation.
+ #### Differences between "--mount" and "--volume" diff --git a/docs/reference/commandline/service_inspect.md b/docs/reference/commandline/service_inspect.md index 93b3178e43..5954bb8c41 100644 --- a/docs/reference/commandline/service_inspect.md +++ b/docs/reference/commandline/service_inspect.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_inspect/ +description: The service inspect command description and usage +keywords: +- service, inspect +title: docker service inspect +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service inspect - ```Markdown Usage: docker service inspect [OPTIONS] SERVICE [SERVICE...] @@ -139,10 +136,10 @@ The `--format` option can be used to obtain specific information about a service. For example, the following command outputs the number of replicas of the "redis" service. -```bash +```bash{% raw %} $ docker service inspect --format='{{.Spec.Mode.Replicated.Replicas}}' redis 10 -``` +{% endraw %}``` ## Related information diff --git a/docs/reference/commandline/service_ls.md b/docs/reference/commandline/service_ls.md index 6b5754f10e..ed5b98f558 100644 --- a/docs/reference/commandline/service_ls.md +++ b/docs/reference/commandline/service_ls.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_ls/ +description: The service ls command description and usage +keywords: +- service, ls +title: docker service ls +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service ls - ```Markdown Usage: docker service ls [OPTIONS] @@ -30,6 +27,7 @@ This command when run targeting a manager, lists services are running in the swarm. On a manager node: + ```bash ID NAME REPLICAS IMAGE COMMAND c8wgl7q4ndfd frontend 5/5 nginx:alpine @@ -47,9 +45,9 @@ than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "b The currently supported filters are: -* [id](#id) -* [label](#label) -* [name](#name) +* [id](service_ls.md#id) +* [label](service_ls.md#label) +* [name](service_ls.md#name) #### ID diff --git a/docs/reference/commandline/service_ps.md b/docs/reference/commandline/service_ps.md index b6ba56e13b..65d4e602a4 100644 --- a/docs/reference/commandline/service_ps.md +++ b/docs/reference/commandline/service_ps.md @@ -1,18 +1,16 @@ - +--- +redirect_from: +- /reference/commandline/service_ps/ +- /engine/reference/commandline/service_tasks/ +description: The service ps command description and usage +keywords: +- service, tasks +- ps +title: docker service ps +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service ps - ```Markdown Usage: docker service ps [OPTIONS] SERVICE @@ -60,9 +58,9 @@ Multiple filter flags are combined as an `OR` filter. For example, The currently supported filters are: -* [id](#id) -* [name](#name) -* [desired-state](#desired-state) +* [id](service_ps.md#id) +* [name](service_ps.md#name) +* [desired-state](service_ps.md#desired-state) #### ID diff --git a/docs/reference/commandline/service_rm.md b/docs/reference/commandline/service_rm.md index 32985e0e5c..2560f73734 100644 --- a/docs/reference/commandline/service_rm.md +++ b/docs/reference/commandline/service_rm.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_rm/ +description: The service rm command description and usage +keywords: +- service, rm +title: docker service rm +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service rm - ```Markdown Usage: docker service rm [OPTIONS] SERVICE [SERVICE...] diff --git a/docs/reference/commandline/service_scale.md b/docs/reference/commandline/service_scale.md index 68a5d45609..9393d84923 100644 --- a/docs/reference/commandline/service_scale.md +++ b/docs/reference/commandline/service_scale.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_scale/ +description: The service scale command description and usage +keywords: +- service, scale +title: docker service scale +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service scale - ```markdown Usage: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] @@ -25,8 +22,8 @@ Options: ### Scale a service -If you scale a service, you set the *desired* number of replicas. Even though -the command returns directly, actual scaling of the service may take some time. +The scale command enables you to scale one or more services either up or down to the desired number of replicas. The command will return immediatly, but the actual scaling of the service may take some time. To stop all replicas of a service while keeping the service active in the swarm you can set the scale to 0. + For example, the following command scales the "frontend" service to 50 tasks. diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 06c07e205d..8aef9114a8 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/service_update/ +description: The service update command description and usage +keywords: +- service, update +title: docker service update +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# service update - ```Markdown Usage: docker service update [OPTIONS] SERVICE diff --git a/docs/reference/commandline/stack_config.md b/docs/reference/commandline/stack_config.md index 4c6cfa1089..cf74f76137 100644 --- a/docs/reference/commandline/stack_config.md +++ b/docs/reference/commandline/stack_config.md @@ -1,15 +1,12 @@ - - -# stack config (experimental) +--- +redirect_from: + - /reference/commandline/stack_config/ +advisory: experimental +description: The stack config command description and usage +keywords: +- stack, config +title: docker stack config (experimental) +--- ```markdown Usage: docker stack config [OPTIONS] STACK diff --git a/docs/reference/commandline/stack_deploy.md b/docs/reference/commandline/stack_deploy.md index a1a9366c7f..bb72084cd0 100644 --- a/docs/reference/commandline/stack_deploy.md +++ b/docs/reference/commandline/stack_deploy.md @@ -1,15 +1,12 @@ - - -# stack deploy (experimental) +--- +redirect_from: + - /reference/commandline/stack_deploy/ +advisory: experimental +description: The stack deploy command description and usage +keywords: +- stack, deploy, up +title: docker stack deploy (experimental) +--- ```markdown Usage: docker stack deploy [OPTIONS] STACK diff --git a/docs/reference/commandline/stack_rm.md b/docs/reference/commandline/stack_rm.md index 8e3f2259a7..0d28698044 100644 --- a/docs/reference/commandline/stack_rm.md +++ b/docs/reference/commandline/stack_rm.md @@ -1,15 +1,12 @@ - - -# stack rm (experimental) +--- +redirect_from: + - /reference/commandline/stack_rm/ +advisory: experimental +description: The stack rm command description and usage +keywords: +- stack, rm, remove, down +title: docker stack rm (experimental) +--- ```markdown Usage: docker stack rm STACK diff --git a/docs/reference/commandline/stack_services.md b/docs/reference/commandline/stack_services.md index dedb22f8c8..cbe8982fe2 100644 --- a/docs/reference/commandline/stack_services.md +++ b/docs/reference/commandline/stack_services.md @@ -1,15 +1,12 @@ - - -# stack services (experimental) +--- +redirect_from: + - /reference/commandline/stack_services/ +advisory: experimental +description: The stack services command description and usage +keywords: +- stack, services +title: docker stack services (experimental) +--- ```markdown Usage: docker stack services [OPTIONS] STACK @@ -39,7 +36,7 @@ dn7m7nhhfb9y myapp_db 1/1 mysql@sha256:a9a5b559f8821fe73d58c3606c8 The filtering flag (`-f` or `--filter`) format is a `key=value` pair. If there is more than one filter, then pass multiple flags (e.g. `--filter "foo=bar" --filter "bif=baz"`). -Multiple filter flags are combined as an `OR` filter. +Multiple filter flags are combined as an `OR` filter. The following command shows both the `web` and `db` services: diff --git a/docs/reference/commandline/stack_tasks.md b/docs/reference/commandline/stack_tasks.md index b8bc91aa9d..b0db9b8da1 100644 --- a/docs/reference/commandline/stack_tasks.md +++ b/docs/reference/commandline/stack_tasks.md @@ -1,15 +1,12 @@ - - -# stack tasks (experimental) +--- +redirect_from: + - /reference/commandline/stack_tasks/ +advisory: experimental +description: The stack tasks command description and usage +keywords: +- stack, tasks +title: docker stack tasks (experimental) +--- ```markdown Usage: docker stack tasks [OPTIONS] STACK @@ -35,9 +32,9 @@ Multiple filter flags are combined as an `OR` filter. For example, The currently supported filters are: -* [id](#id) -* [name](#name) -* [desired-state](#desired-state) +* [id](stack_tasks.md#id) +* [name](stack_tasks.md#name) +* [desired-state](stack_tasks.md#desired-state) ## Related information diff --git a/docs/reference/commandline/start.md b/docs/reference/commandline/start.md index 72ff7e1002..059867bbd7 100644 --- a/docs/reference/commandline/start.md +++ b/docs/reference/commandline/start.md @@ -1,14 +1,11 @@ - - -# start +--- +redirect_from: + - /reference/commandline/start/ +description: The start command description and usage +keywords: +- Start, container, stopped +title: docker start +--- ```markdown Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/stats.md b/docs/reference/commandline/stats.md index 3e1a5c4ccc..8cbcbfd3d6 100644 --- a/docs/reference/commandline/stats.md +++ b/docs/reference/commandline/stats.md @@ -1,14 +1,11 @@ - - -# stats +--- +redirect_from: + - /reference/commandline/stats/ +description: The stats command description and usage +keywords: +- container, resource, statistics +title: docker stats +--- ```markdown Usage: docker stats [OPTIONS] [CONTAINER...] @@ -23,7 +20,7 @@ Options: The `docker stats` command returns a live data stream for running containers. To limit data to one or more specific containers, specify a list of container names or ids separated by a space. You can specify a stopped container but stopped containers do not return any data. -If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint. +If you want more detailed information about a container's resource usage, use the `/containers/(id)/stats` API endpoint. ## Examples diff --git a/docs/reference/commandline/stop.md b/docs/reference/commandline/stop.md index 662255846f..c353b751e4 100644 --- a/docs/reference/commandline/stop.md +++ b/docs/reference/commandline/stop.md @@ -1,14 +1,11 @@ - - -# stop +--- +redirect_from: + - /reference/commandline/stop/ +description: The stop command description and usage +keywords: +- stop, SIGKILL, SIGTERM +title: docker stop +--- ```markdown Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/swarm_init.md b/docs/reference/commandline/swarm_init.md index 1e8c1dd2d2..c379db9fa4 100644 --- a/docs/reference/commandline/swarm_init.md +++ b/docs/reference/commandline/swarm_init.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/swarm_init/ +description: The swarm init command description and usage +keywords: +- swarm, init +title: docker swarm init +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# swarm init - ```markdown Usage: docker swarm init [OPTIONS] diff --git a/docs/reference/commandline/swarm_join.md b/docs/reference/commandline/swarm_join.md index f87e20c552..458a0ce118 100644 --- a/docs/reference/commandline/swarm_join.md +++ b/docs/reference/commandline/swarm_join.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/swarm_join/ +description: The swarm join command description and usage +keywords: +- swarm, join +title: docker swarm join +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# swarm join - ```markdown Usage: docker swarm join [OPTIONS] HOST:PORT diff --git a/docs/reference/commandline/swarm_join_token.md b/docs/reference/commandline/swarm_join_token.md index 4b4d652bf3..8666f4e6ff 100644 --- a/docs/reference/commandline/swarm_join_token.md +++ b/docs/reference/commandline/swarm_join_token.md @@ -1,14 +1,11 @@ - - -# swarm join-token +--- +redirect_from: + - /reference/commandline/swarm_join_token/ +description: The swarm join-token command description and usage +keywords: +- swarm, join-token +title: docker swarm join-token +--- ```markdown Usage: docker swarm join-token [--rotate] (worker|manager) diff --git a/docs/reference/commandline/swarm_leave.md b/docs/reference/commandline/swarm_leave.md index 62ae925f9f..48ca4c2b16 100644 --- a/docs/reference/commandline/swarm_leave.md +++ b/docs/reference/commandline/swarm_leave.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/swarm_leave/ +description: The swarm leave command description and usage +keywords: +- swarm, leave +title: docker swarm leave +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# swarm leave - ```markdown Usage: docker swarm leave [OPTIONS] @@ -32,6 +29,7 @@ without using `--force`. Only use `--force` in situations where the swarm will no longer be used after the manager leaves, such as in a single-node swarm. Consider the following swarm, as seen from the manager: + ```bash $ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS @@ -41,10 +39,12 @@ dvfxp4zseq4s0rih1selh0d20 * manager1 Ready Active Leader ``` To remove `worker2`, issue the following command from `worker2` itself: + ```bash $ docker swarm leave Node left the default swarm. ``` + To remove an inactive node, use the [`node rm`](node_rm.md) command instead. ## Related information diff --git a/docs/reference/commandline/swarm_update.md b/docs/reference/commandline/swarm_update.md index 57c7c8c909..1034fab05d 100644 --- a/docs/reference/commandline/swarm_update.md +++ b/docs/reference/commandline/swarm_update.md @@ -1,17 +1,14 @@ - +--- +redirect_from: + - /reference/commandline/swarm_update/ +description: The swarm update command description and usage +keywords: +- swarm, update +title: docker swarm update +--- **Warning:** this command is part of the Swarm management feature introduced in Docker 1.12, and might be subject to non backward-compatible changes. -# swarm update - ```markdown Usage: docker swarm update [OPTIONS] diff --git a/docs/reference/commandline/tag.md b/docs/reference/commandline/tag.md index 60692958f1..e416f625a4 100644 --- a/docs/reference/commandline/tag.md +++ b/docs/reference/commandline/tag.md @@ -1,14 +1,11 @@ - - -# tag +--- +redirect_from: + - /reference/commandline/tag/ +description: The tag command description and usage +keywords: +- tag, name, image +title: docker tag +--- ```markdown Usage: docker tag IMAGE[:TAG] IMAGE[:TAG] diff --git a/docs/reference/commandline/top.md b/docs/reference/commandline/top.md index 291f96ce09..302f8a4350 100644 --- a/docs/reference/commandline/top.md +++ b/docs/reference/commandline/top.md @@ -1,14 +1,11 @@ - - -# top +--- +redirect_from: + - /reference/commandline/top/ +description: The top command description and usage +keywords: +- container, running, processes +title: docker top +--- ```markdown Usage: docker top CONTAINER [ps OPTIONS] diff --git a/docs/reference/commandline/unpause.md b/docs/reference/commandline/unpause.md index e5c9d506e0..7cc2aefed0 100644 --- a/docs/reference/commandline/unpause.md +++ b/docs/reference/commandline/unpause.md @@ -1,14 +1,11 @@ - - -# unpause +--- +redirect_from: + - /reference/commandline/unpause/ +description: The unpause command description and usage +keywords: +- cgroups, suspend, container +title: docker unpause +--- ```markdown Usage: docker unpause CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/update.md b/docs/reference/commandline/update.md index 6993a737d0..c49e3c230f 100644 --- a/docs/reference/commandline/update.md +++ b/docs/reference/commandline/update.md @@ -1,14 +1,11 @@ - - -## update +--- +redirect_from: + - /reference/commandline/update/ +description: The update command description and usage +keywords: +- resources, update, dynamically +title: docker update +--- ```markdown Usage: docker update [OPTIONS] CONTAINER [CONTAINER...] diff --git a/docs/reference/commandline/version.md b/docs/reference/commandline/version.md index e650e41a2d..ae24479cce 100644 --- a/docs/reference/commandline/version.md +++ b/docs/reference/commandline/version.md @@ -1,14 +1,11 @@ - - -# version +--- +redirect_from: + - /reference/commandline/version/ +description: The version command description and usage +keywords: +- version, architecture, api +title: docker version +--- ```markdown Usage: docker version [OPTIONS] @@ -49,10 +46,14 @@ describes all the details of the format. **Get server version:** + {% raw %} $ docker version --format '{{.Server.Version}}' 1.8.0 + {% endraw %} **Dump raw data:** + {% raw %} $ docker version --format '{{json .}}' {"Client":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"},"ServerOK":true,"Server":{"Version":"1.8.0","ApiVersion":"1.20","GitCommit":"f5bae0a","GoVersion":"go1.4.2","Os":"linux","Arch":"amd64","KernelVersion":"3.13.2-gentoo","BuildTime":"Tue Jun 23 17:56:00 UTC 2015"}} + {% endraw %} diff --git a/docs/reference/commandline/volume_create.md b/docs/reference/commandline/volume_create.md index 56c8a5fcc0..212f10aa62 100644 --- a/docs/reference/commandline/volume_create.md +++ b/docs/reference/commandline/volume_create.md @@ -1,14 +1,11 @@ - - -# volume create +--- +redirect_from: + - /reference/commandline/volume_create/ +description: The volume create command description and usage +keywords: +- volume, create +title: docker volume create +--- ```markdown Usage: docker volume create [OPTIONS] @@ -42,7 +39,7 @@ Volume names must be unique among drivers. This means you cannot use the same v A volume named "hello" already exists with the "some-other" driver. Choose a different volume name. ``` -If you specify a volume name already in use on the current driver, Docker assumes you want to re-use the existing volume and does not return an error. +If you specify a volume name already in use on the current driver, Docker assumes you want to re-use the existing volume and does not return an error. ## Driver specific options @@ -58,7 +55,7 @@ different volume drivers may do different things (or nothing at all). The built-in `local` driver on Windows does not support any options. The built-in `local` driver on Linux accepts options similar to the linux `mount` command. You can provide multiple options by passing the `--opt` flag multiple times. Some `mount` options (such as the `o` option) can take a comma-separated list of options. Complete list of available mount options can be found [here](http://man7.org/linux/man-pages/man8/mount.8.html). - + For example, the following creates a `tmpfs` volume called `foo` with a size of 100 megabyte and `uid` of 1000. ```bash diff --git a/docs/reference/commandline/volume_inspect.md b/docs/reference/commandline/volume_inspect.md index fac9438e3d..d8a4e98d14 100644 --- a/docs/reference/commandline/volume_inspect.md +++ b/docs/reference/commandline/volume_inspect.md @@ -1,14 +1,11 @@ - - -# volume inspect +--- +redirect_from: + - /reference/commandline/volume_inspect/ +description: The volume inspect command description and usage +keywords: +- volume, inspect +title: docker volume inspect +--- ```markdown Usage: docker volume inspect [OPTIONS] VOLUME [VOLUME...] @@ -40,8 +37,10 @@ Example output: } ] + {% raw %} $ docker volume inspect --format '{{ .Mountpoint }}' 85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d /var/lib/docker/volumes/85bffb0677236974f93955d8ecc4df55ef5070117b0e53333cc1b443777be24d/_data + {% endraw %} ## Related information diff --git a/docs/reference/commandline/volume_ls.md b/docs/reference/commandline/volume_ls.md index cdeea42e8c..985c243b92 100644 --- a/docs/reference/commandline/volume_ls.md +++ b/docs/reference/commandline/volume_ls.md @@ -1,14 +1,11 @@ - - -# volume ls +--- +redirect_from: + - /reference/commandline/volume_ls/ +description: The volume ls command description and usage +keywords: +- volume, list +title: docker volume ls +--- ```markdown Usage: docker volume ls [OPTIONS] @@ -27,7 +24,7 @@ Options: -q, --quiet Only display volume names ``` -Lists all the volumes Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. +Lists all the volumes Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](volume_ls.md#filtering) section for more information about available filter options. Example output: diff --git a/docs/reference/commandline/volume_rm.md b/docs/reference/commandline/volume_rm.md index 52d7f067bf..8e131a04ec 100644 --- a/docs/reference/commandline/volume_rm.md +++ b/docs/reference/commandline/volume_rm.md @@ -1,14 +1,11 @@ - - -# volume rm +--- +redirect_from: + - /reference/commandline/volume_rm/ +description: the volume rm command description and usage +keywords: +- volume, rm +title: docker volume rm +--- ```markdown Usage: docker volume rm VOLUME [VOLUME...] diff --git a/docs/reference/commandline/wait.md b/docs/reference/commandline/wait.md index b10f6a1a21..7adb1f2a2f 100644 --- a/docs/reference/commandline/wait.md +++ b/docs/reference/commandline/wait.md @@ -1,14 +1,11 @@ - - -# wait +--- +redirect_from: + - /reference/commandline/wait/ +description: The wait command description and usage +keywords: +- container, stop, wait +title: docker wait +--- ```markdown Usage: docker wait CONTAINER [CONTAINER...] diff --git a/docs/reference/glossary.md b/docs/reference/glossary.md index d386d52bbb..54481c2ea0 100644 --- a/docs/reference/glossary.md +++ b/docs/reference/glossary.md @@ -1,21 +1,17 @@ - - -# Glossary +--- +redirect_from: + - /reference/glossary/ +description: Glossary of terms used around Docker +keywords: +- glossary, docker, terms, definitions +title: Docker glossary +--- A list of terms used around the Docker project. ## aufs -aufs (advanced multi layered unification filesystem) is a Linux [filesystem](#filesystem) that +aufs (advanced multi layered unification filesystem) is a Linux [filesystem](glossary.md#filesystem) that Docker supports as a storage backend. It implements the [union mount](http://en.wikipedia.org/wiki/Union_mount) for Linux file systems. @@ -26,17 +22,17 @@ An image that has no parent is a **base image**. ## boot2docker [boot2docker](http://boot2docker.io/) is a lightweight Linux distribution made -specifically to run Docker containers. The boot2docker management tool for Mac and Windows was deprecated and replaced by [`docker-machine`](#machine) which you can install with the Docker Toolbox. +specifically to run Docker containers. The boot2docker management tool for Mac and Windows was deprecated and replaced by [`docker-machine`](glossary.md#machine) which you can install with the Docker Toolbox. ## btrfs -btrfs (B-tree file system) is a Linux [filesystem](#filesystem) that Docker +btrfs (B-tree file system) is a Linux [filesystem](glossary.md#filesystem) that Docker supports as a storage backend. It is a [copy-on-write](http://en.wikipedia.org/wiki/Copy-on-write) filesystem. ## build -build is the process of building Docker images using a [Dockerfile](#dockerfile). +build is the process of building Docker images using a [Dockerfile](glossary.md#dockerfile). The build uses a Dockerfile and a "context". The context is the set of files in the directory in which the image is built. @@ -60,7 +56,7 @@ be done to get it running. ## container -A container is a runtime instance of a [docker image](#image). +A container is a runtime instance of a [docker image](glossary.md#image). A Docker container consists of @@ -115,11 +111,11 @@ Examples : - Linux : ext4, aufs, btrfs, zfs - Windows : NTFS -- OS X : HFS+ +- macOS : HFS+ ## image -Docker images are the basis of [containers](#container). An Image is an +Docker images are the basis of [containers](glossary.md#container). An Image is an ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime. An image typically contains a union of layered filesystems stacked on top of each other. An image @@ -170,23 +166,23 @@ for docker containers in a cluster. ## overlay storage driver -OverlayFS is a [filesystem](#filesystem) service for Linux which implements a +OverlayFS is a [filesystem](glossary.md#filesystem) service for Linux which implements a [union mount](http://en.wikipedia.org/wiki/Union_mount) for other file systems. It is supported by the Docker daemon as a storage driver. ## registry -A Registry is a hosted service containing [repositories](#repository) of [images](#image) +A Registry is a hosted service containing [repositories](glossary.md#repository) of [images](glossary.md#image) which responds to the Registry API. -The default registry can be accessed using a browser at [Docker Hub](#docker-hub) +The default registry can be accessed using a browser at [Docker Hub](glossary.md#docker-hub) or using the `docker search` command. ## repository A repository is a set of Docker images. A repository can be shared by pushing it -to a [registry](#registry) server. The different images in the repository can be -labeled using [tags](#tag). +to a [registry](glossary.md#registry) server. The different images in the repository can be +labeled using [tags](glossary.md#tag). Here is an example of the shared [nginx repository](https://hub.docker.com/_/nginx/) and its [tags](https://hub.docker.com/r/library/nginx/tags/) @@ -220,11 +216,11 @@ automatically distributes requests to the service VIP among the active tasks. ## swarm -A [swarm](../swarm/index.md) is a cluster of one or more Docker Engines running in [swarm mode](#swarm-mode). +A [swarm](../swarm/index.md) is a cluster of one or more Docker Engines running in [swarm mode](glossary.md#swarm-mode). ## Swarm -Do not confuse [Docker Swarm](https://github.com/docker/swarm) with the [swarm mode](#swarm-mode) features in Docker Engine. +Do not confuse [Docker Swarm](https://github.com/docker/swarm) with the [swarm mode](glossary.md#swarm-mode) features in Docker Engine. Docker Swarm is the name of a standalone native clustering tool for Docker. Docker Swarm pools together several Docker hosts and exposes them as a single @@ -241,7 +237,7 @@ join nodes to a swarm, the Docker Engine runs in swarm mode. ## tag -A tag is a label applied to a Docker image in a [repository](#repository). +A tag is a label applied to a Docker image in a [repository](glossary.md#repository). tags are how various images in a repository are distinguished from each other. *Note : This label is not related to the key=value labels set for docker daemon* @@ -276,7 +272,7 @@ A virtual machine is a program that emulates a complete computer and imitates de It shares physical hardware resources with other users but isolates the operating system. The end user has the same experience on a Virtual Machine as they would have on dedicated hardware. -Compared to to containers, a virtual machine is heavier to run, provides more isolation, +Compared to containers, a virtual machine is heavier to run, provides more isolation, gets its own set of resources and does minimal sharing. *Also known as : VM* diff --git a/docs/reference/index.md b/docs/reference/index.md index a207ee7d05..305ae8f45f 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -1,14 +1,11 @@ - +--- +redirect_from: + - /reference/ +description: Docker Engine reference +keywords: +- Engine +title: Engine reference +--- # Engine reference diff --git a/docs/reference/run.md b/docs/reference/run.md index a57ea76467..4a0d2db4c6 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -1,15 +1,11 @@ - - -# Docker run reference +--- +redirect_from: + - /reference/run/ +description: Configure containers at runtime +keywords: +- docker, run, configure, runtime +title: Docker run reference +--- Docker runs processes in isolated containers. A container is a process which runs on a host. The host may be local or remote. When an operator @@ -58,18 +54,18 @@ types*](commandline/cli.md#option-types). Only the operator (the person executing `docker run`) can set the following options. - - [Detached vs foreground](#detached-vs-foreground) - - [Detached (-d)](#detached-d) - - [Foreground](#foreground) - - [Container identification](#container-identification) - - [Name (--name)](#name-name) - - [PID equivalent](#pid-equivalent) - - [IPC settings (--ipc)](#ipc-settings-ipc) - - [Network settings](#network-settings) - - [Restart policies (--restart)](#restart-policies-restart) - - [Clean up (--rm)](#clean-up-rm) - - [Runtime constraints on resources](#runtime-constraints-on-resources) - - [Runtime privilege and Linux capabilities](#runtime-privilege-and-linux-capabilities) + - [Detached vs foreground](run.md#detached-vs-foreground) + - [Detached (-d)](run.md#detached-d) + - [Foreground](run.md#foreground) + - [Container identification](run.md#container-identification) + - [Name (--name)](run.md#name-name) + - [PID equivalent](run.md#pid-equivalent) + - [IPC settings (--ipc)](run.md#ipc-settings-ipc) + - [Network settings](run.md#network-settings) + - [Restart policies (--restart)](run.md#restart-policies-restart) + - [Clean up (--rm)](run.md#clean-up-rm) + - [Runtime constraints on resources](run.md#runtime-constraints-on-resources) + - [Runtime privilege and Linux capabilities](run.md#runtime-privilege-and-linux-capabilities) ## Detached vs foreground @@ -181,7 +177,7 @@ Images using the v2 or later image format have a content-addressable identifier called a digest. As long as the input used to generate the image is unchanged, the digest value is predictable and referenceable. -The following example runs a container from the `alpine` image with the +The following example runs a container from the `alpine` image with the `sha256:9cacb71397b640eca97488cf08582ae4e4068513101088e9f96c9814bfda95e0` digest: $ docker run alpine@sha256:9cacb71397b640eca97488cf08582ae4e4068513101088e9f96c9814bfda95e0 date @@ -420,7 +416,7 @@ running the `redis-cli` command and connecting to the Redis server over the You can create a network using a Docker network driver or an external network driver plugin. You can connect multiple containers to the same network. Once connected to a user-defined network, the containers can communicate easily using -only another container's IP address or name. +only another container's IP address or name. For `overlay` networks or custom plugins that support multi-host connectivity, containers connected to the same multi-host network but launched from different @@ -537,18 +533,22 @@ will try forever to restart the container. The number of (attempted) restarts for a container can be obtained via [`docker inspect`](commandline/inspect.md). For example, to get the number of restarts for container "my-container"; + {% raw %} $ docker inspect -f "{{ .RestartCount }}" my-container # 2 + {% endraw %} Or, to get the last time the container was (re)started; + {% raw %} $ docker inspect -f "{{ .State.StartedAt }}" my-container # 2015-03-04T23:47:07.691840179Z + {% endraw %} Combining `--restart` (restart policy) with the `--rm` (clean up) flag results in an error. On container restart, attached clients are disconnected. See the -examples on using the [`--rm` (clean up)](#clean-up-rm) flag later in this page. +examples on using the [`--rm` (clean up)](run.md#clean-up-rm) flag later in this page. ### Examples @@ -1253,15 +1253,15 @@ Four of the Dockerfile commands cannot be overridden at runtime: `FROM`, in `docker run`. We'll go through what the developer might have set in each Dockerfile instruction and how the operator can override that setting. - - [CMD (Default Command or Options)](#cmd-default-command-or-options) + - [CMD (Default Command or Options)](run.md#cmd-default-command-or-options) - [ENTRYPOINT (Default Command to Execute at Runtime)]( #entrypoint-default-command-to-execute-at-runtime) - - [EXPOSE (Incoming Ports)](#expose-incoming-ports) - - [ENV (Environment Variables)](#env-environment-variables) - - [HEALTHCHECK](#healthcheck) - - [VOLUME (Shared Filesystems)](#volume-shared-filesystems) - - [USER](#user) - - [WORKDIR](#workdir) + - [EXPOSE (Incoming Ports)](run.md#expose-incoming-ports) + - [ENV (Environment Variables)](run.md#env-environment-variables) + - [HEALTHCHECK](run.md#healthcheck) + - [VOLUME (Shared Filesystems)](run.md#volume-shared-filesystems) + - [USER](run.md#user) + - [WORKDIR](run.md#workdir) ### CMD (default command or options) @@ -1366,34 +1366,12 @@ it will provide a named alias for the container being linked to. When a new container is created, Docker will set the following environment variables automatically: - - - - - - - - - - - - - - - - - - - - -
VariableValue
HOME - Set based on the value of USER -
HOSTNAME - The hostname associated with the container -
PATH - Includes popular directories, such as :
- /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -
TERMxterm if the container is allocated a pseudo-TTY
+| Variable | Value | +| -------- | ----- | +| `HOME` | Set based on the value of `USER` | +| `HOSTNAME` | The hostname associated with the container | +| `PATH` | Includes popular directories, such as `:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` | +| `TERM` | `xterm` if the container is allocated a pseudo-TTY | Additionally, the operator can **set any environment variable** in the container by using one or more `-e` flags, even overriding those mentioned @@ -1422,6 +1400,7 @@ Similarly the operator can set the **hostname** with `-h`. Example: + {% raw %} $ docker run --name=test -d \ --health-cmd='stat /etc/passwd || exit 1' \ --health-interval=2s \ @@ -1466,6 +1445,7 @@ Example: } ] } + {% endraw %} The health status is also displayed in the `docker ps` output.