mirror of https://github.com/docker/docs.git
engine: update reference docs for v24.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
afeaca91a8
commit
6a993450ad
|
@ -163,7 +163,7 @@ options:
|
||||||
- option: host
|
- option: host
|
||||||
shorthand: H
|
shorthand: H
|
||||||
value_type: list
|
value_type: list
|
||||||
description: Daemon socket(s) to connect to
|
description: Daemon socket to connect to
|
||||||
deprecated: false
|
deprecated: false
|
||||||
hidden: false
|
hidden: false
|
||||||
experimental: false
|
experimental: false
|
||||||
|
|
|
@ -15,6 +15,18 @@ options:
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: annotation
|
||||||
|
value_type: map
|
||||||
|
default_value: map[]
|
||||||
|
description: |
|
||||||
|
Add an annotation to the container (passed through to the OCI runtime)
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
min_api_version: "1.43"
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
- option: attach
|
- option: attach
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: list
|
value_type: list
|
||||||
|
|
|
@ -15,6 +15,18 @@ options:
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: annotation
|
||||||
|
value_type: map
|
||||||
|
default_value: map[]
|
||||||
|
description: |
|
||||||
|
Add an annotation to the container (passed through to the OCI runtime)
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
min_api_version: "1.43"
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
- option: attach
|
- option: attach
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: list
|
value_type: list
|
||||||
|
|
|
@ -32,6 +32,18 @@ options:
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: annotation
|
||||||
|
value_type: map
|
||||||
|
default_value: map[]
|
||||||
|
description: |
|
||||||
|
Add an annotation to the container (passed through to the OCI runtime)
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
min_api_version: "1.43"
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
- option: attach
|
- option: attach
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: list
|
value_type: list
|
||||||
|
|
|
@ -59,7 +59,8 @@ examples: |-
|
||||||
```console
|
```console
|
||||||
$ docker info
|
$ docker info
|
||||||
|
|
||||||
Client:
|
Client: Docker Engine - Community
|
||||||
|
Version: 24.0.0
|
||||||
Context: default
|
Context: default
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
Plugins:
|
Plugins:
|
||||||
|
@ -113,7 +114,6 @@ examples: |-
|
||||||
Docker Root Dir: /var/lib/docker
|
Docker Root Dir: /var/lib/docker
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
Username: gordontheturtle
|
Username: gordontheturtle
|
||||||
Registry: https://index.docker.io/v1/
|
|
||||||
Experimental: false
|
Experimental: false
|
||||||
Insecure Registries:
|
Insecure Registries:
|
||||||
myinsecurehost:5000
|
myinsecurehost:5000
|
||||||
|
@ -138,7 +138,8 @@ examples: |-
|
||||||
```console
|
```console
|
||||||
C:\> docker info
|
C:\> docker info
|
||||||
|
|
||||||
Client:
|
Client: Docker Engine - Community
|
||||||
|
Version: 24.0.0
|
||||||
Context: default
|
Context: default
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
Plugins:
|
Plugins:
|
||||||
|
@ -174,7 +175,6 @@ examples: |-
|
||||||
ID: 2880d38d-464e-4d01-91bd-c76f33ba3981
|
ID: 2880d38d-464e-4d01-91bd-c76f33ba3981
|
||||||
Docker Root Dir: C:\ProgramData\docker
|
Docker Root Dir: C:\ProgramData\docker
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
Registry: https://index.docker.io/v1/
|
|
||||||
Experimental: true
|
Experimental: true
|
||||||
Insecure Registries:
|
Insecure Registries:
|
||||||
myregistry:5000
|
myregistry:5000
|
||||||
|
|
|
@ -120,9 +120,9 @@ examples: |-
|
||||||
```console
|
```console
|
||||||
$ docker ps --no-trunc
|
$ docker ps --no-trunc
|
||||||
|
|
||||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||||
4c01db0b339c ubuntu:22.04 bash 17 seconds ago Up 16 seconds 3300-3310/tcp webapp
|
ca5534a51dd04bbcebe9b23ba05f389466cf0c190f1f8f182d7eea92a9671d00 ubuntu:22.04 bash 17 seconds ago Up 16 seconds 3300-3310/tcp webapp
|
||||||
d7886598dbe2 crosbymichael/redis:latest /redis-server --dir 33 minutes ago Up 33 minutes 6379/tcp redis,webapp/db
|
9ca9747b233100676a48cc7806131586213fa5dab86dd1972d6a8732e3a84a4d crosbymichael/redis:latest /redis-server --dir 33 minutes ago Up 33 minutes 6379/tcp redis,webapp/db
|
||||||
```
|
```
|
||||||
|
|
||||||
### Show both running and stopped containers (-a, --all) {#all}
|
### Show both running and stopped containers (-a, --all) {#all}
|
||||||
|
|
|
@ -20,6 +20,18 @@ options:
|
||||||
experimentalcli: false
|
experimentalcli: false
|
||||||
kubernetes: false
|
kubernetes: false
|
||||||
swarm: false
|
swarm: false
|
||||||
|
- option: annotation
|
||||||
|
value_type: map
|
||||||
|
default_value: map[]
|
||||||
|
description: |
|
||||||
|
Add an annotation to the container (passed through to the OCI runtime)
|
||||||
|
deprecated: false
|
||||||
|
hidden: false
|
||||||
|
min_api_version: "1.43"
|
||||||
|
experimental: false
|
||||||
|
experimentalcli: false
|
||||||
|
kubernetes: false
|
||||||
|
swarm: false
|
||||||
- option: attach
|
- option: attach
|
||||||
shorthand: a
|
shorthand: a
|
||||||
value_type: list
|
value_type: list
|
||||||
|
|
|
@ -2,21 +2,39 @@ command: docker tag
|
||||||
aliases: docker image tag, docker tag
|
aliases: docker image tag, docker tag
|
||||||
short: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
|
short: Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
|
||||||
long: |-
|
long: |-
|
||||||
An image name is made up of slash-separated name components, optionally prefixed
|
A full image name has the following format and components:
|
||||||
by a registry hostname. The hostname must comply with standard DNS rules, but
|
|
||||||
may not contain underscores. If a hostname is present, it may optionally be
|
|
||||||
followed by a port number in the format `:8080`. If not present, the command
|
|
||||||
uses Docker's public registry located at `registry-1.docker.io` by default. Name
|
|
||||||
components may contain lowercase letters, digits and separators. A separator
|
|
||||||
is defined as a period, one or two underscores, or one or more hyphens. A name
|
|
||||||
component may not start or end with a separator.
|
|
||||||
|
|
||||||
A tag name must be valid ASCII and may contain lowercase and uppercase letters,
|
`[HOST[:PORT_NUMBER]/]PATH`
|
||||||
digits, underscores, periods and hyphens. A tag name may not start with a
|
|
||||||
period or a hyphen and may contain a maximum of 128 characters.
|
|
||||||
|
|
||||||
You can group your images together using names and tags, and then upload them
|
- `HOST`: The optional registry hostname specifies where the image is located.
|
||||||
to [*Share images on Docker Hub*](/get-started/part3/).
|
The hostname must comply with standard DNS rules, but may not contain
|
||||||
|
underscores. If the hostname is not specified, the command uses Docker's public
|
||||||
|
registry at `registry-1.docker.io` by default. Note that `docker.io` is the
|
||||||
|
canonical reference for Docker's public registry.
|
||||||
|
- `PORT_NUMBER`: If a hostname is present, it may optionally be followed by a
|
||||||
|
registry port number in the format `:8080`.
|
||||||
|
- `PATH`: The path consists consists of slash-separated components. Each
|
||||||
|
component may contain lowercase letters, digits and separators. A separator is
|
||||||
|
defined as a period, one or two underscores, or one or more hyphens. A component
|
||||||
|
may not start or end with a separator. While the
|
||||||
|
[OCI Distribution Specification](https://github.com/opencontainers/distribution-spec)
|
||||||
|
supports more than two slash-separated components, most registries only support
|
||||||
|
two slash-separated components. For Docker's public registry, the path format is
|
||||||
|
as follows:
|
||||||
|
- `[NAMESPACE/]REPOSITORY`: The first, optional component is typically a
|
||||||
|
user's or an organization's namespace. The second, mandatory component is the
|
||||||
|
repository name. When the namespace is not present, Docker uses `library`
|
||||||
|
as the default namespace.
|
||||||
|
|
||||||
|
After the image name, the optional `TAG` is a custom, human-readable manifest
|
||||||
|
identifier that is typically a specific version or variant of an image. The tag
|
||||||
|
must be valid ASCII and can contain lowercase and uppercase letters, digits,
|
||||||
|
underscores, periods, and hyphens. It cannot start with a period or hyphen and
|
||||||
|
must be no longer than 128 characters. If the tag is not specified, the command uses `latest` by default.
|
||||||
|
|
||||||
|
You can group your images together using names and tags, and then
|
||||||
|
[push](/engine/reference/commandline/push) them to a
|
||||||
|
registry.
|
||||||
usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
|
usage: docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
|
||||||
pname: docker
|
pname: docker
|
||||||
plink: docker.yaml
|
plink: docker.yaml
|
||||||
|
@ -34,7 +52,7 @@ inherited_options:
|
||||||
examples: |-
|
examples: |-
|
||||||
### Tag an image referenced by ID
|
### Tag an image referenced by ID
|
||||||
|
|
||||||
To tag a local image with ID "0e5574283393" into the "fedora" repository with
|
To tag a local image with ID "0e5574283393" as "fedora/httpd" with the tag
|
||||||
"version1.0":
|
"version1.0":
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
@ -43,8 +61,7 @@ examples: |-
|
||||||
|
|
||||||
### Tag an image referenced by Name
|
### Tag an image referenced by Name
|
||||||
|
|
||||||
To tag a local image with name "httpd" into the "fedora" repository with
|
To tag a local image "httpd" as "fedora/httpd" with the tag "version1.0":
|
||||||
"version1.0":
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker tag httpd fedora/httpd:version1.0
|
$ docker tag httpd fedora/httpd:version1.0
|
||||||
|
@ -55,17 +72,17 @@ examples: |-
|
||||||
|
|
||||||
### Tag an image referenced by Name and Tag
|
### Tag an image referenced by Name and Tag
|
||||||
|
|
||||||
To tag a local image with name "httpd" and tag "test" into the "fedora"
|
To tag a local image with the name "httpd" and the tag "test" as "fedora/httpd"
|
||||||
repository with "version1.0.test":
|
with the tag "version1.0.test":
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker tag httpd:test fedora/httpd:version1.0.test
|
$ docker tag httpd:test fedora/httpd:version1.0.test
|
||||||
```
|
```
|
||||||
|
|
||||||
### Tag an image for a private repository
|
### Tag an image for a private registry
|
||||||
|
|
||||||
To push an image to a private registry and not the central Docker
|
To push an image to a private registry and not the public Docker registry you
|
||||||
registry you must tag it with the registry hostname and port (if needed).
|
must include the registry hostname and port (if needed).
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
|
$ docker tag 0e5574283393 myregistryhost:5000/fedora/httpd:version1.0
|
||||||
|
|
Loading…
Reference in New Issue