Compare commits

...

27 Commits

Author SHA1 Message Date
fd3371eb7d Merge pull request #2810 from thaJeztah/19.03_backport_docs_maintainer
[19.03 backport] Replace deprecated instruction
2020-10-24 09:44:17 +02:00
01fc5a1ec3 Replace deprecated instruction
MAINTAINER is deprecated, replacing with LABEL as recommended by
https://docs.docker.com/engine/reference/builder/#maintainer-deprecated

Signed-off-by: Charlotte Mach <charlotte.mach@fs.lmu.de>
(cherry picked from commit aa4cb24739)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-24 01:13:34 +02:00
8363956559 Merge pull request #2797 from thaJeztah/19.03_backport_reversion
[19.03 backport] docs: update 20.03 -> 20.10 in deprecated.md
2020-10-16 22:49:04 +02:00
3b3e295c4b docs: update 20.03 -> 20.10 in deprecated.md
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6c0a3dfbff)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 02:23:14 +02:00
3ce6b9faea Merge pull request #2781 from thaJeztah/19.03_backport_fix_links
[19.03 backport] docs: fix broken links in build reference
2020-10-07 11:37:09 +02:00
d1b44aa298 docs: fix broken links in build reference
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3fe574b7ef)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-07 11:08:24 +02:00
7c0824cf3f Merge pull request #2776 from thaJeztah/19.03_backport_deprecate_experimental_options
[19.03 backport] Deprecate configuration options for experimental CLI features
2020-10-02 18:02:28 +02:00
20bc15f618 docs/deprecated: remove minor versions
Some deprecations are ammended during a major (YY.MM) release, to
inform users as early as possible about deprecations. Removing the
minor version from this overview clarifies that features are
marked deprecated during which major release's lifecycle.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit de8b696ed6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-02 17:14:53 +02:00
3172219932 docs: deprecate CLI options for experimental CLI features
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 48822564b6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-02 17:09:55 +02:00
f132c8ad4a docs: add /go/experimental/ vanity URL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c2225ad126)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-02 17:07:44 +02:00
11b255cb7d Merge pull request #2758 from thaJeztah/19.03_backport_update_security_link
[19.03 backport] docs: update URL for security landing page
2020-09-29 16:37:05 -07:00
d3fcef0ffa Merge pull request #2760 from thaJeztah/19.03_backport_fix_yaml_gen
[19.03 backport] docs: fix generated YAML due to trailing whitespace
2020-09-29 14:36:08 -07:00
df5ca0c950 docs: fix generated YAML due to trailing whitespace
If a file contains trailing whitespace, the YAML generator uses a
compact format, which is hard to read.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2484a30534)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-29 22:02:11 +02:00
5057d34272 docs: update URL for security landing page
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 54bbd782bf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-29 21:22:13 +02:00
b53d702737 Merge pull request #2749 from thaJeztah/19.03_backport_fix_logs_example
[19.03 backport] docs: fix "docker logs" example missing container name
2020-09-29 10:21:47 +02:00
4620b42c3b Merge pull request #2750 from thaJeztah/19.03_backport_rewrite_build_env
[19.03 backport] builder: rephrase ENV section, remove examples for ENV key value without '='
2020-09-29 10:20:43 +02:00
278f30b82b Add test-case for env with, and without =
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0eb3cfd261)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-28 14:16:03 +02:00
f526bcdb53 builder: add note about alternative syntax
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a4a3d2f94d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-28 14:16:00 +02:00
10973d6ddf builder: rephrase ENV section, remove examples for ENV key value without '='
The `ENV key value` form can be ambiguous, for example, the following defines
a single env-variable (`ONE`) with value `"TWO= THREE=world"`:

    ENV ONE TWO= THREE=world

While we cannot deprecate/remove that syntax (as it would break existing
Dockerfiles), we should reduce exposure of the format in our examples.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0a0037c6fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-28 14:15:48 +02:00
8c8fb03f15 docs: fix "docker logs" example missing container name
Thanks to rvsasseen for spotting this, and Maximillian Xavier
for the initial pull request.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bcb2a4c925)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-28 14:03:21 +02:00
c80dda68d8 Merge pull request #2725 from thaJeztah/19.03_backport_update_caps_docs_and_completion
[19.03 backport] Update documentation on capabilities, and add missing CAP_AUDIT_READ
2020-09-18 11:58:03 +02:00
c9a03ab5f4 Bash-completion: add CAP_AUDIT_READ
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5b035964c4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-18 01:33:37 +02:00
ffa0e1d36e docs: document CAP_AUDIT_READ
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 884a5ffbdf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-18 01:33:35 +02:00
3d74f7ab48 docs: document optional "CAP_" prefix for capabilities
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4e58c29513)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-18 01:33:33 +02:00
0a207d5095 docs: sort list of capabilities alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5bbdcd1c9d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-18 01:33:31 +02:00
9aa3848b06 Merge pull request #2724 from thaJeztah/19.03_backport_cap_completion
[19.03 backport] Complete capabilites with and without "CAP_" prefix.
2020-09-18 01:31:46 +02:00
75411a2233 Complete capabilites with and without "CAP_" prefix.
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 015cb98846)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-16 15:53:03 +02:00
20 changed files with 228 additions and 177 deletions

View File

@ -81,6 +81,14 @@ func TestNewImportCommandSuccess(t *testing.T) {
},
{
name: "change",
args: []string{"--change", "ENV DEBUG=true", "-"},
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
assert.Check(t, is.Equal("ENV DEBUG=true", options.Changes[0]))
return ioutil.NopCloser(strings.NewReader("")), nil
},
},
{
name: "change legacy syntax",
args: []string{"--change", "ENV DEBUG true", "-"},
imageImportFunc: func(source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) {
assert.Check(t, is.Equal("ENV DEBUG true", options.Changes[0]))

View File

@ -831,55 +831,58 @@ __docker_complete_local_ips() {
# not granted by default and may be added.
# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
__docker_complete_capabilities_addable() {
COMPREPLY=( $( compgen -W "
local capabilities=(
ALL
AUDIT_CONTROL
BLOCK_SUSPEND
DAC_READ_SEARCH
IPC_LOCK
IPC_OWNER
LEASE
LINUX_IMMUTABLE
MAC_ADMIN
MAC_OVERRIDE
NET_ADMIN
NET_BROADCAST
SYS_ADMIN
SYS_BOOT
SYSLOG
SYS_MODULE
SYS_NICE
SYS_PACCT
SYS_PTRACE
SYS_RAWIO
SYS_RESOURCE
SYS_TIME
SYS_TTY_CONFIG
WAKE_ALARM
" -- "$cur" ) )
CAP_AUDIT_CONTROL
CAP_AUDIT_READ
CAP_BLOCK_SUSPEND
CAP_DAC_READ_SEARCH
CAP_IPC_LOCK
CAP_IPC_OWNER
CAP_LEASE
CAP_LINUX_IMMUTABLE
CAP_MAC_ADMIN
CAP_MAC_OVERRIDE
CAP_NET_ADMIN
CAP_NET_BROADCAST
CAP_SYS_ADMIN
CAP_SYS_BOOT
CAP_SYSLOG
CAP_SYS_MODULE
CAP_SYS_NICE
CAP_SYS_PACCT
CAP_SYS_PTRACE
CAP_SYS_RAWIO
CAP_SYS_RESOURCE
CAP_SYS_TIME
CAP_SYS_TTY_CONFIG
CAP_WAKE_ALARM
)
COMPREPLY=( $( compgen -W "${capabilities[*]} ${capabilities[*]#CAP_}" -- "$cur" ) )
}
# __docker_complete_capabilities_droppable completes Linux capability options which are
# allowed by default and can be dropped.
# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
__docker_complete_capabilities_droppable() {
COMPREPLY=( $( compgen -W "
local capabilities=(
ALL
AUDIT_WRITE
CHOWN
DAC_OVERRIDE
FOWNER
FSETID
KILL
MKNOD
NET_BIND_SERVICE
NET_RAW
SETFCAP
SETGID
SETPCAP
SETUID
SYS_CHROOT
" -- "$cur" ) )
CAP_AUDIT_WRITE
CAP_CHOWN
CAP_DAC_OVERRIDE
CAP_FOWNER
CAP_FSETID
CAP_KILL
CAP_MKNOD
CAP_NET_BIND_SERVICE
CAP_NET_RAW
CAP_SETFCAP
CAP_SETGID
CAP_SETPCAP
CAP_SETUID
CAP_SYS_CHROOT
)
COMPREPLY=( $( compgen -W "${capabilities[*]} ${capabilities[*]#CAP_}" -- "$cur" ) )
}
__docker_complete_detach_keys() {

View File

@ -50,49 +50,55 @@ The table below provides an overview of the current status of deprecated feature
Status | Feature | Deprecated | Remove
-----------|------------------------------------------------------------------------------------------------------------------------------------|------------|------------
Deprecated | [Pushing and pulling with image manifest v2 schema 1](#pushing-and-pulling-with-image-manifest-v2-schema-1) | v19.03.0 | v20.03.0
Deprecated | [`docker engine` subcommands](#docker-engine-subcommands) | v19.03.0 | v20.03.0
Deprecated | [Top-level `docker deploy` subcommand (experimental)](#top-level-docker-deploy-subcommand-experimental) | v19.03.0 | v20.03.0
Deprecated | [`docker stack deploy` using "dab" files (experimental)](#docker-stack-deploy-using-dab-files-experimental) | v19.03.0 | v20.03.0
Deprecated | [AuFS storage driver](#aufs-storage-driver) | v19.03.0 | -
Deprecated | [Legacy "overlay" storage driver](#legacy-overlay-storage-driver) | v18.09.0 | -
Deprecated | [Device mapper storage driver](#device-mapper-storage-driver) | v18.09.0 | -
Deprecated | [Reserved namespaces in engine labels](#reserved-namespaces-in-engine-labels) | v18.06.0 | v20.03.0
Removed | [`--disable-legacy-registry` override daemon option](#--disable-legacy-registry-override-daemon-option) | v17.12.0 | v19.03.0
Removed | [Interacting with V1 registries](#interacting-with-v1-registries) | v17.06.0 | v17.12.0
Removed | [Asynchronous `service create` and `service update` as default](#asynchronous-service-create-and-service-update-as-default) | v17.05.0 | v17.10.0
Removed | [`-g` and `--graph` flags on `dockerd`](#-g-and---graph-flags-on-dockerd) | v17.05.0 | -
Deprecated | [Top-level network properties in NetworkSettings](#top-level-network-properties-in-networksettings) | v1.13.0 | v17.12.0
Deprecated | [`filter` param for `/images/json` endpoint](#filter-param-for-imagesjson-endpoint) | v1.13.0 | v17.12.0
Removed | [`repository:shortid` image references](#repositoryshortid-image-references) | v1.13.0 | v17.12.0
Removed | [`docker daemon` subcommand](#docker-daemon-subcommand) | v1.13.0 | v17.12.0
Removed | [Duplicate keys with conflicting values in engine labels](#duplicate-keys-with-conflicting-values-in-engine-labels) | v1.13.0 | v17.12.0
Deprecated | [`MAINTAINER` in Dockerfile](#maintainer-in-dockerfile) | v1.13.0 | -
Deprecated | [API calls without a version](#api-calls-without-a-version) | v1.13.0 | v17.12.0
Removed | [Backing filesystem without `d_type` support for overlay/overlay2](#backing-filesystem-without-d_type-support-for-overlayoverlay2) | v1.13.0 | v17.12.0
Deprecated | [`--automated` and `--stars` flags on `docker search`](#--automated-and---stars-flags-on-docker-search) | v1.12.0 | v17.09.0
Deprecated | [`-h` shorthand for `--help`](#-h-shorthand-for---help) | v1.12.0 | v17.09.0
Removed | [`-e` and `--email` flags on `docker login`](#-e-and---email-flags-on-docker-login) | v1.11.0 | v17.06.0
Deprecated | [Separator (`:`) of `--security-opt` flag on `docker run`](#separator--of---security-opt-flag-on-docker-run) | v1.11.0 | v17.06.0
Deprecated | [Ambiguous event fields in API](#ambiguous-event-fields-in-api) | v1.10.0 | -
Removed | [`-f` flag on `docker tag`](#-f-flag-on-docker-tag) | v1.10.0 | v1.12.0
Removed | [HostConfig at API container start](#hostconfig-at-api-container-start) | v1.10.0 | v1.12.0
Removed | [`--before` and `--since` flags on `docker ps`](#--before-and---since-flags-on-docker-ps) | v1.10.0 | v1.12.0
Removed | [Driver-specific log tags](#driver-specific-log-tags) | v1.9.0 | v1.12.0
Removed | [Docker Content Trust `ENV` passphrase variables name change](#docker-content-trust-env-passphrase-variables-name-change) | v1.9.0 | v1.12.0
Removed | [`/containers/(id or name)/copy` endpoint](#containersid-or-namecopy-endpoint) | v1.8.0 | v1.12.0
Removed | [LXC built-in exec driver](#lxc-built-in-exec-driver) | v1.8.0 | v1.10.0
Removed | [Old Command Line Options](#old-command-line-options) | v1.8.0 | v1.10.0
Removed | [`--api-enable-cors` flag on `dockerd`](#--api-enable-cors-flag-on-dockerd) | v1.6.0 | v17.09.0
Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10.0 | v1.13.0
Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12.0
Deprecated | [Configuration options for experimental CLI features](#configuration-options-for-experimental-cli-features) | v19.03 | v20.10
Deprecated | [Pushing and pulling with image manifest v2 schema 1](#pushing-and-pulling-with-image-manifest-v2-schema-1) | v19.03 | v20.10
Deprecated | [`docker engine` subcommands](#docker-engine-subcommands) | v19.03 | v20.10
Deprecated | [Top-level `docker deploy` subcommand (experimental)](#top-level-docker-deploy-subcommand-experimental) | v19.03 | v20.10
Deprecated | [`docker stack deploy` using "dab" files (experimental)](#docker-stack-deploy-using-dab-files-experimental) | v19.03 | v20.10
Deprecated | [AuFS storage driver](#aufs-storage-driver) | v19.03 | -
Deprecated | [Legacy "overlay" storage driver](#legacy-overlay-storage-driver) | v18.09 | -
Deprecated | [Device mapper storage driver](#device-mapper-storage-driver) | v18.09 | -
Deprecated | [Use of reserved namespaces in engine labels](#use-of-reserved-namespaces-in-engine-labels) | v18.06 | v20.10
Removed | [`--disable-legacy-registry` override daemon option](#--disable-legacy-registry-override-daemon-option) | v17.12 | v19.03
Removed | [Interacting with V1 registries](#interacting-with-v1-registries) | v17.06 | v17.12
Removed | [Asynchronous `service create` and `service update` as default](#asynchronous-service-create-and-service-update-as-default) | v17.05 | v17.10
Removed | [`-g` and `--graph` flags on `dockerd`](#-g-and---graph-flags-on-dockerd) | v17.05 | -
Deprecated | [Top-level network properties in NetworkSettings](#top-level-network-properties-in-networksettings) | v1.13 | v17.12
Deprecated | [`filter` param for `/images/json` endpoint](#filter-param-for-imagesjson-endpoint) | v1.13 | v20.10
Removed | [`repository:shortid` image references](#repositoryshortid-image-references) | v1.13 | v17.12
Removed | [`docker daemon` subcommand](#docker-daemon-subcommand) | v1.13 | v17.12
Removed | [Duplicate keys with conflicting values in engine labels](#duplicate-keys-with-conflicting-values-in-engine-labels) | v1.13 | v17.12
Deprecated | [`MAINTAINER` in Dockerfile](#maintainer-in-dockerfile) | v1.13 | -
Deprecated | [API calls without a version](#api-calls-without-a-version) | v1.13 | v17.12
Removed | [Backing filesystem without `d_type` support for overlay/overlay2](#backing-filesystem-without-d_type-support-for-overlayoverlay2) | v1.13 | v17.12
Deprecated | [`--automated` and `--stars` flags on `docker search`](#--automated-and---stars-flags-on-docker-search) | v1.12 | v20.10
Deprecated | [`-h` shorthand for `--help`](#-h-shorthand-for---help) | v1.12 | v17.09
Removed | [`-e` and `--email` flags on `docker login`](#-e-and---email-flags-on-docker-login) | v1.11 | v17.06
Deprecated | [Separator (`:`) of `--security-opt` flag on `docker run`](#separator--of---security-opt-flag-on-docker-run) | v1.11 | v17.06
Deprecated | [Ambiguous event fields in API](#ambiguous-event-fields-in-api) | v1.10 | -
Removed | [`-f` flag on `docker tag`](#-f-flag-on-docker-tag) | v1.10 | v1.12
Removed | [HostConfig at API container start](#hostconfig-at-api-container-start) | v1.10 | v1.12
Removed | [`--before` and `--since` flags on `docker ps`](#--before-and---since-flags-on-docker-ps) | v1.10 | v1.12
Removed | [Driver-specific log tags](#driver-specific-log-tags) | v1.9 | v1.12
Removed | [Docker Content Trust `ENV` passphrase variables name change](#docker-content-trust-env-passphrase-variables-name-change) | v1.9 | v1.12
Removed | [`/containers/(id or name)/copy` endpoint](#containersid-or-namecopy-endpoint) | v1.8 | v1.12
Removed | [LXC built-in exec driver](#lxc-built-in-exec-driver) | v1.8 | v1.10
Removed | [Old Command Line Options](#old-command-line-options) | v1.8 | v1.10
Removed | [`--api-enable-cors` flag on `dockerd`](#--api-enable-cors-flag-on-dockerd) | v1.6 | v17.09
Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10 | v1.13
Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12
### Configuration options for experimental CLI features
The `DOCKER_CLI_EXPERIMENTAL` environment variable and the corresponding `experimental`
field in the CLI configuration file are deprecated. Experimental features will be
enabled by default, and these configuration options will no longer be functional.
### Pushing and pulling with image manifest v2 schema 1
**Deprecated in Release: v19.03.0**
**Deprecated in Release: v19.03**
**Target For Removal In Release: v20.03.0**
**Target For Removal In Release: v20.10**
The image manifest
[v2 schema 1](https://github.com/docker/distribution/blob/fda42e5ef908bdba722d435ff1f330d40dfcd56c/docs/spec/manifest-v2-1.md)
@ -104,9 +110,9 @@ If the registry you are using still supports v2 schema 1, urge their administrat
### `docker engine` subcommands
**Deprecated in Release: v19.03.0**
**Deprecated in Release: v19.03**
**Target For Removal In Release: v20.03.0**
**Target For Removal In Release: v20.10**
The `docker engine activate`, `docker engine check`, and `docker engine update`
provided an alternative installation method to upgrade Docker Community engines
@ -120,9 +126,9 @@ standard package managers.
### Top-level `docker deploy` subcommand (experimental)
**Deprecated in Release: v19.03.0**
**Deprecated in Release: v19.03**
**Target For Removal In Release: v20.03.0**
**Target For Removal In Release: v20.10**
The top-level `docker deploy` command (using the "Docker Application Bundle"
(.dab) file format was introduced as an experimental feature in Docker 1.13 /
@ -132,9 +138,9 @@ subcommand.
### `docker stack deploy` using "dab" files (experimental)
**Deprecated in Release: v19.03.0**
**Deprecated in Release: v19.03**
**Target For Removal In Release: v20.03.0**
**Target For Removal In Release: v20.10**
With no development being done on this feature, and no active use of the file
format, support for the DAB file format and the top-level docker deploy command
@ -144,7 +150,7 @@ using compose files.
### AuFS storage driver
**Deprecated in Release: v19.03.0**
**Deprecated in Release: v19.03**
The `aufs` storage driver is deprecated in favor of `overlay2`, and will
be removed in a future release. Users of the `aufs` storage driver are
@ -163,7 +169,7 @@ maintenance of the `aufs` storage driver.
### Legacy "overlay" storage driver
**Deprecated in Release: v18.09.0**
**Deprecated in Release: v18.09**
The `overlay` storage driver is deprecated in favor of the `overlay2` storage
driver, which has all the benefits of `overlay`, without its limitations (excessive
@ -178,7 +184,7 @@ backported), there is no reason to keep maintaining the `overlay` storage driver
### Device mapper storage driver
**Deprecated in Release: v18.09.0**
**Deprecated in Release: v18.09**
The `devicemapper` storage driver is deprecated in favor of `overlay2`, and will
be removed in a future release. Users of the `devicemapper` storage driver are
@ -193,15 +199,17 @@ either on kernel 4.x, or have support for multiple lowerdirs backported), there
is no reason to continue maintenance of the `devicemapper` storage driver.
### Reserved namespaces in engine labels
### Use of reserved namespaces in engine labels
**Deprecated in Release: v18.06.0**
**Deprecated in Release: v18.06**
**Target For Removal In Release: v20.10**
The namespaces `com.docker.*`, `io.docker.*`, and `org.dockerproject.*` in engine labels
were always documented to be reserved, but there was never any enforcement.
Usage of these namespaces will now cause a warning in the engine logs to discourage their
use, and will error instead in v20.03.0 and above.
use, and will error instead in v20.10 and above.
### `--disable-legacy-registry` override daemon option
@ -237,11 +245,11 @@ start when set.
### Asynchronous `service create` and `service update` as default
**Deprecated In Release: v17.05.0**
**Deprecated In Release: v17.05**
**Disabled by default in release: [v17.10](https://github.com/docker/docker-ce/releases/tag/v17.10.0-ce)**
Docker 17.05.0 added an optional `--detach=false` option to make the
Docker 17.05 added an optional `--detach=false` option to make the
`docker service create` and `docker service update` work synchronously. This
option will be enabled by default in Docker 17.10, at which point the `--detach`
flag can be used to use the previous (asynchronous) behavior.
@ -251,7 +259,7 @@ and `docker service scale` in Docker 17.10.
### `-g` and `--graph` flags on `dockerd`
**Deprecated In Release: v17.05.0**
**Deprecated In Release: v17.05**
The `-g` or `--graph` flag for the `dockerd` or `docker daemon` command was
used to indicate the directory in which to store persistent data and resource
@ -283,7 +291,7 @@ information.
### `filter` param for `/images/json` endpoint
**Deprecated In Release: [v1.13.0](https://github.com/docker/docker/releases/tag/v1.13.0)**
**Target For Removal In Release: v17.12**
**Target For Removal In Release: v20.10**
The `filter` param to filter the list of image by reference (name or name:tag) is now implemented as a regular filter, named `reference`.
@ -348,7 +356,7 @@ further information.
**Deprecated in Release: [v1.12.0](https://github.com/docker/docker/releases/tag/v1.12.0)**
**Target For Removal In Release: v17.09**
**Target For Removal In Release: v20.10**
The `docker search --automated` and `docker search --stars` options are deprecated.
Use `docker search --filter=is-automated=...` and `docker search --filter=stars=...` instead.

View File

@ -500,10 +500,10 @@ Example (parsed representation is displayed after the `#`):
```dockerfile
FROM busybox
ENV foo /bar
WORKDIR ${foo} # WORKDIR /bar
ADD . $foo # ADD . /bar
COPY \$foo /quux # COPY $foo /quux
ENV FOO=/bar
WORKDIR ${FOO} # WORKDIR /bar
ADD . $FOO # ADD . /bar
COPY \$FOO /quux # COPY $FOO /quux
```
Environment variables are supported by the following list of instructions in
@ -994,53 +994,74 @@ port. For detailed information, see the
## ENV
```dockerfile
ENV <key> <value>
ENV <key>=<value> ...
```
The `ENV` instruction sets the environment variable `<key>` to the value
`<value>`. This value will be in the environment for all subsequent instructions
in the build stage and can be [replaced inline](#environment-replacement) in
many as well.
The `ENV` instruction has two forms. The first form, `ENV <key> <value>`,
will set a single variable to a value. The entire string after the first
space will be treated as the `<value>` - including whitespace characters. The
value will be interpreted for other environment variables, so quote characters
will be removed if they are not escaped.
The second form, `ENV <key>=<value> ...`, allows for multiple variables to
be set at one time. Notice that the second form uses the equals sign (=)
in the syntax, while the first form does not. Like command line parsing,
many as well. The value will be interpreted for other environment variables, so
quote characters will be removed if they are not escaped. Like command line parsing,
quotes and backslashes can be used to include spaces within values.
For example:
Example:
```dockerfile
ENV myName="John Doe" myDog=Rex\ The\ Dog \
myCat=fluffy
ENV MY_NAME="John Doe"
ENV MY_DOG=Rex\ The\ Dog
ENV MY_CAT=fluffy
```
and
The `ENV` instruction allows for multiple `<key>=<value> ...` variables to be set
at one time, and the example below will yield the same net results in the final
image:
```dockerfile
ENV myName John Doe
ENV myDog Rex The Dog
ENV myCat fluffy
ENV MY_NAME="John Doe" MY_DOG=Rex\ The\ Dog \
MY_CAT=fluffy
```
will yield the same net results in the final image.
The environment variables set using `ENV` will persist when a container is run
from the resulting image. You can view the values using `docker inspect`, and
change them using `docker run --env <key>=<value>`.
> **Note**
Environment variable persistence can cause unexpected side effects. For example,
setting `ENV DEBIAN_FRONTEND=noninteractive` changes the behavior of `apt-get`,
and may confuse users of your image.
If an environment variable is only needed during build, and not in the final
image, consider setting a value for a single command instead:
```dockerfile
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y ...
```
Or using [`ARG`](#arg), which is not persisted in the final image:
```dockerfile
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y ...
```
> **Alternative syntax**
>
> Environment persistence can cause unexpected side effects. For example,
> setting `ENV DEBIAN_FRONTEND noninteractive` may confuse apt-get
> users on a Debian-based image. To set a value for a single command, use
> `RUN <key>=<value> <command>`.
> The `ENV` instruction also allows an alternative syntax `ENV <key> <value>`,
> omitting the `=`. For example:
>
> ```dockerfile
> ENV MY_VAR my-value
> ```
>
> This syntax does not allow for multiple environment-variables to be set in a
> single `ENV` instruction, and can be confusing. For example, the following
> sets a single environment variable (`ONE`) with value `"TWO= THREE=world"`:
>
> ```dockerfile
> ENV ONE TWO= THREE=world
> ```
>
> The alternative syntax is supported for backward compatibility, but discouraged
> for the reasons outlined above, and may be removed in a future release.
## ADD
@ -1768,7 +1789,7 @@ The `WORKDIR` instruction can resolve environment variables previously set using
For example:
```dockerfile
ENV DIRPATH /path
ENV DIRPATH=/path
WORKDIR $DIRPATH/$DIRNAME
RUN pwd
```
@ -1873,7 +1894,7 @@ this Dockerfile with an `ENV` and `ARG` instruction.
```dockerfile
FROM ubuntu
ARG CONT_IMG_VER
ENV CONT_IMG_VER v1.0.0
ENV CONT_IMG_VER=v1.0.0
RUN echo $CONT_IMG_VER
```
@ -1894,7 +1915,7 @@ useful interactions between `ARG` and `ENV` instructions:
```dockerfile
FROM ubuntu
ARG CONT_IMG_VER
ENV CONT_IMG_VER ${CONT_IMG_VER:-v1.0.0}
ENV CONT_IMG_VER=${CONT_IMG_VER:-v1.0.0}
RUN echo $CONT_IMG_VER
```
@ -2030,7 +2051,7 @@ Consider another example under the same command line:
```dockerfile
FROM ubuntu
ARG CONT_IMG_VER
ENV CONT_IMG_VER $CONT_IMG_VER
ENV CONT_IMG_VER=$CONT_IMG_VER
RUN echo $CONT_IMG_VER
```
@ -2045,7 +2066,7 @@ this Dockerfile:
```dockerfile
FROM ubuntu
ARG CONT_IMG_VER
ENV CONT_IMG_VER hello
ENV CONT_IMG_VER=hello
RUN echo $CONT_IMG_VER
```

View File

@ -402,14 +402,14 @@ the command line.
### Use a custom parent cgroup (--cgroup-parent)
When `docker build` is run with the `--cgroup-parent` option the containers
used in the build will be run with the [corresponding `docker run`
flag](../run.md#specify-custom-cgroups).
used in the build will be run with the
[corresponding `docker run` flag](../run.md#specify-custom-cgroups).
### Set ulimits in container (--ulimit)
Using the `--ulimit` option with `docker build` will cause each build step's
container to be started using those [`--ulimit`
flag values](run.md#set-ulimits-in-container---ulimit).
container to be started using those
[`--ulimit` flag values](run.md#set-ulimits-in-container---ulimit).
### Set build-time variables (--build-arg)
@ -742,7 +742,7 @@ FROM busybox
RUN echo hello > /hello
RUN echo world >> /hello
RUN touch remove_me /remove_me
ENV HELLO world
ENV HELLO=world
RUN rm /remove_me
```

View File

@ -2,6 +2,8 @@
title: "Use the Docker command line"
description: "Docker's CLI command description and usage"
keywords: "Docker, Docker documentation, CLI, command line"
redirect_from:
- /go/experimental/
---
<!-- This file is maintained within the docker/cli GitHub

View File

@ -73,7 +73,7 @@ $ docker inspect -f "{{ .Config.Env }}" c3f279d17e0a
[HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
$ docker commit --change "ENV DEBUG true" c3f279d17e0a svendowideit/testimage:version3
$ docker commit --change "ENV DEBUG=true" c3f279d17e0a svendowideit/testimage:version3
f5283438590d

View File

@ -66,7 +66,7 @@ sourced from the file `/home/me/my-kube-config`:
$ docker context create \
--docker host=unix:///var/run/docker.sock \
--kubernetes config-file=/home/me/my-kube-config \
my-context
my-context
```
### Create a context based on an existing context
@ -76,7 +76,7 @@ an existing context. The example below creates a new context named `my-context`
from the existing context `existing-context`:
```bash
$ docker context create --from existing-context my-context
$ docker context create --from existing-context my-context
```
If the `--from` option is not set, the `context` is created from the current context:

View File

@ -72,7 +72,7 @@ $ sudo tar -c . | docker import - exampleimagedir
### Import from a local directory with new configurations
```bash
$ sudo tar -c . | docker import --change "ENV DEBUG true" - exampleimagedir
$ sudo tar -c . | docker import --change "ENV DEBUG=true" - exampleimagedir
```
Note the `sudo` in this example you must preserve

View File

@ -53,7 +53,7 @@ $ cat ~/my_password.txt | docker login --username foo --password-stdin
`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/engine/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](https://docs.docker.com/engine/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 credentials in

View File

@ -71,7 +71,7 @@ In order to retrieve logs before a specific point in time, run:
$ docker run --name test -d busybox sh -c "while true; do $(echo date); sleep 1; done"
$ date
Tue 14 Nov 2017 16:40:00 CET
$ docker logs -f --until=2s
$ docker logs -f --until=2s test
Tue 14 Nov 2017 16:40:00 CET
Tue 14 Nov 2017 16:40:01 CET
Tue 14 Nov 2017 16:40:02 CET

View File

@ -160,7 +160,7 @@ Digest can also be used in the `FROM` of a Dockerfile, for example:
```dockerfile
FROM ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
MAINTAINER some maintainer <maintainer@example.com>
LABEL maintainer="some maintainer <maintainer@example.com>"
```
> **Note**

View File

@ -1287,58 +1287,67 @@ options which are allowed by default and can be dropped.
| Capability Key | Capability Description |
|:-----------------|:------------------------------------------------------------------------------------------------------------------------------|
| SETPCAP | Modify process capabilities. |
| MKNOD | Create special files using mknod(2). |
| AUDIT_WRITE | Write records to kernel auditing log. |
| CHOWN | Make arbitrary changes to file UIDs and GIDs (see chown(2)). |
| NET_RAW | Use RAW and PACKET sockets. |
| DAC_OVERRIDE | Bypass file read, write, and execute permission checks. |
| FOWNER | Bypass permission checks on operations that normally require the file system UID of the process to match the UID of the file. |
| FSETID | Don't clear set-user-ID and set-group-ID permission bits when a file is modified. |
| KILL | Bypass permission checks for sending signals. |
| SETGID | Make arbitrary manipulations of process GIDs and supplementary GID list. |
| SETUID | Make arbitrary manipulations of process UIDs. |
| MKNOD | Create special files using mknod(2). |
| NET_BIND_SERVICE | Bind a socket to internet domain privileged ports (port numbers less than 1024). |
| SYS_CHROOT | Use chroot(2), change root directory. |
| NET_RAW | Use RAW and PACKET sockets. |
| SETFCAP | Set file capabilities. |
| SETGID | Make arbitrary manipulations of process GIDs and supplementary GID list. |
| SETPCAP | Modify process capabilities. |
| SETUID | Make arbitrary manipulations of process UIDs. |
| SYS_CHROOT | Use chroot(2), change root directory. |
The next table shows the capabilities which are not granted by default and may be added.
| Capability Key | Capability Description |
|:----------------|:----------------------------------------------------------------------------------------------------------------|
| SYS_MODULE | Load and unload kernel modules. |
| SYS_RAWIO | Perform I/O port operations (iopl(2) and ioperm(2)). |
| SYS_PACCT | Use acct(2), switch process accounting on or off. |
| SYS_ADMIN | Perform a range of system administration operations. |
| SYS_NICE | Raise process nice value (nice(2), setpriority(2)) and change the nice value for arbitrary processes. |
| SYS_RESOURCE | Override resource Limits. |
| SYS_TIME | Set system clock (settimeofday(2), stime(2), adjtimex(2)); set real-time (hardware) clock. |
| SYS_TTY_CONFIG | Use vhangup(2); employ various privileged ioctl(2) operations on virtual terminals. |
| AUDIT_CONTROL | Enable and disable kernel auditing; change auditing filter rules; retrieve auditing status and filtering rules. |
| AUDIT_READ | Allow reading audit messages from the kernel. |
| BLOCK_SUSPEND | Employ features that can block system suspend. |
| DAC_READ_SEARCH | Bypass file read permission checks and directory read and execute permission checks. |
| IPC_LOCK | Lock memory (mlock(2), mlockall(2), mmap(2), shmctl(2)). |
| IPC_OWNER | Bypass permission checks for operations on System V IPC objects. |
| LEASE | Establish leases on arbitrary files (see fcntl(2)). |
| LINUX_IMMUTABLE | Set the FS_APPEND_FL and FS_IMMUTABLE_FL i-node flags. |
| MAC_ADMIN | Allow MAC configuration or state changes. Implemented for the Smack LSM. |
| MAC_OVERRIDE | Override Mandatory Access Control (MAC). Implemented for the Smack Linux Security Module (LSM). |
| NET_ADMIN | Perform various network-related operations. |
| SYSLOG | Perform privileged syslog(2) operations. |
| DAC_READ_SEARCH | Bypass file read permission checks and directory read and execute permission checks. |
| LINUX_IMMUTABLE | Set the FS_APPEND_FL and FS_IMMUTABLE_FL i-node flags. |
| NET_BROADCAST | Make socket broadcasts, and listen to multicasts. |
| IPC_LOCK | Lock memory (mlock(2), mlockall(2), mmap(2), shmctl(2)). |
| IPC_OWNER | Bypass permission checks for operations on System V IPC objects. |
| SYS_PTRACE | Trace arbitrary processes using ptrace(2). |
| SYS_ADMIN | Perform a range of system administration operations. |
| SYS_BOOT | Use reboot(2) and kexec_load(2), reboot and load a new kernel for later execution. |
| LEASE | Establish leases on arbitrary files (see fcntl(2)). |
| SYS_MODULE | Load and unload kernel modules. |
| SYS_NICE | Raise process nice value (nice(2), setpriority(2)) and change the nice value for arbitrary processes. |
| SYS_PACCT | Use acct(2), switch process accounting on or off. |
| SYS_PTRACE | Trace arbitrary processes using ptrace(2). |
| SYS_RAWIO | Perform I/O port operations (iopl(2) and ioperm(2)). |
| SYS_RESOURCE | Override resource Limits. |
| SYS_TIME | Set system clock (settimeofday(2), stime(2), adjtimex(2)); set real-time (hardware) clock. |
| SYS_TTY_CONFIG | Use vhangup(2); employ various privileged ioctl(2) operations on virtual terminals. |
| SYSLOG | Perform privileged syslog(2) operations. |
| WAKE_ALARM | Trigger something that will wake up the system. |
| BLOCK_SUSPEND | Employ features that can block system suspend. |
Further reference information is available on the [capabilities(7) - Linux man page](http://man7.org/linux/man-pages/man7/capabilities.7.html)
Both flags support the value `ALL`, so if the
operator wants to have all capabilities but `MKNOD` they could use:
Both flags support the value `ALL`, so to allow a container to use all capabilities
except for `MKNOD`:
```bash
$ docker run --cap-add=ALL --cap-drop=MKNOD ...
```
The `--cap-add` and `--cap-drop` flags accept capabilities to be specified with
a `CAP_` prefix. The following examples are therefore equivalent:
```bash
$ docker run --cap-add=SYS_ADMIN ...
$ docker run --cap-add=CAP_SYS_ADMIN ...
```
For interacting with the network stack, instead of using `--privileged` they
should use `--cap-add=NET_ADMIN` to modify the network interfaces.

View File

@ -116,8 +116,8 @@ func TestBuildIidFileSquash(t *testing.T) {
buildDir := fs.NewDir(t, "test-iidfile-squash-build",
fs.WithFile("Dockerfile", fmt.Sprintf(`
FROM %s
ENV FOO FOO
ENV BAR BAR
ENV FOO=FOO
ENV BAR=BAR
RUN touch /fiip
RUN touch /foop`, fixtures.AlpineImage)),
)

View File

@ -201,7 +201,7 @@ A Dockerfile is similar to a Makefile.
from the resulting image. Use `docker inspect` to inspect these values, and
change them using `docker run --env <key>=<value>`.
Note that setting "`ENV DEBIAN_FRONTEND noninteractive`" may cause
Note that setting "`ENV DEBIAN_FRONTEND=noninteractive`" may cause
unintended consequences, because it will persist when the container is run
interactively, as with the following command: `docker run -t -i image bash`
@ -388,7 +388,7 @@ A Dockerfile is similar to a Makefile.
```
1 FROM ubuntu
2 ARG CONT_IMG_VER
3 ENV CONT_IMG_VER v1.0.0
3 ENV CONT_IMG_VER=v1.0.0
4 RUN echo $CONT_IMG_VER
```
Then, assume this image is built with this command:
@ -408,7 +408,7 @@ A Dockerfile is similar to a Makefile.
```
1 FROM ubuntu
2 ARG CONT_IMG_VER
3 ENV CONT_IMG_VER ${CONT_IMG_VER:-v1.0.0}
3 ENV CONT_IMG_VER=${CONT_IMG_VER:-v1.0.0}
4 RUN echo $CONT_IMG_VER
```

View File

@ -27,4 +27,4 @@ variable set to "true", you can create a new image based on that
container by first getting the container's ID with `docker ps` and
then running:
$ docker container commit -c="ENV DEBUG true" 98bd7fc99854 debug-image
$ docker container commit -c="ENV DEBUG=true" 98bd7fc99854 debug-image

View File

@ -33,7 +33,7 @@ In order to retrieve logs before a specific point in time, run:
$ docker run --name test -d busybox sh -c "while true; do $(echo date); sleep 1; done"
$ date
Tue 14 Nov 2017 16:40:00 CET
$ docker logs -f --until=2s
$ docker logs -f --until=2s test
Tue 14 Nov 2017 16:40:00 CET
Tue 14 Nov 2017 16:40:01 CET
Tue 14 Nov 2017 16:40:02 CET

View File

@ -36,7 +36,7 @@ Import to docker via pipe and stdin:
## Apply specified Dockerfile instructions while importing the image
This example sets the docker image ENV variable DEBUG to true by default.
# tar -c . | docker image import -c="ENV DEBUG true" - exampleimagedir
# tar -c . | docker image import -c="ENV DEBUG=true" - exampleimagedir
## When the daemon supports multiple operating systems
If the daemon supports multiple operating systems, and the image being imported

View File

@ -111,7 +111,7 @@ pull the above image by digest, run the following command:
Digest can also be used in the `FROM` of a Dockerfile, for example:
FROM ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2
MAINTAINER some maintainer <maintainer@example.com>
LABEL maintainer="some maintainer <maintainer@example.com>"
> **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

View File

@ -6,7 +6,7 @@ do not specify a `SERVER`, the command uses Docker's public registry located at
`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/engine/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](https://docs.docker.com/engine/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