Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[27.x backport] assorted docs updates #5612

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference/commandline/container_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The currently supported filters are:
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove containers with (or without, in case `label!=...` is used) the specified labels.

The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
timestamps, or Go duration strings supported by [ParseDuration](https://pkg.go.dev/time#ParseDuration) (e.g. `10m`, `1h30m`) computed
relative to the daemon machine’s time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02T07:00`, and `2006-01-02`. The local
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/image_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The currently supported filters are:
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove images with (or without, in case `label!=...` is used) the specified labels.

The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
timestamps, or Go duration strings supported by [ParseDuration](https://pkg.go.dev/time#ParseDuration) (e.g. `10m`, `1h30m`) computed
relative to the daemon machine’s time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02T07:00`, and `2006-01-02`. The local
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/commandline/network_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The currently supported filters are:
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove networks with (or without, in case `label!=...` is used) the specified labels.

The `until` filter can be Unix timestamps, date formatted
timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed
timestamps, or Go duration strings supported by [ParseDuration](https://pkg.go.dev/time#ParseDuration) (e.g. `10m`, `1h30m`) computed
relative to the daemon machine’s time. Supported formats for date
formatted time stamps include RFC3339Nano, RFC3339, `2006-01-02T15:04:05`,
`2006-01-02T15:04:05.999999999`, `2006-01-02T07:00`, and `2006-01-02`. The local
Expand Down
26 changes: 13 additions & 13 deletions docs/reference/commandline/node_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ information about available filter options.
$ docker node ps swarm-manager1

NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:7.4.1 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:7.4.1 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:7.4.1 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:7.4.1 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:7.4.1 swarm-manager1 Running Running 5 seconds
```

### <a name="filter"></a> Filtering (--filter)
Expand All @@ -64,11 +64,11 @@ The following filter matches all tasks with a name containing the `redis` string
$ docker node ps -f name=redis swarm-manager1

NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:7.4.1 swarm-manager1 Running Running 5 hours
redis.6.b465edgho06e318egmgjbqo4o redis:7.4.1 swarm-manager1 Running Running 29 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:7.4.1 swarm-manager1 Running Running 5 seconds
redis.9.dkkual96p4bb3s6b10r7coxxt redis:7.4.1 swarm-manager1 Running Running 5 seconds
redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:7.4.1 swarm-manager1 Running Running 5 seconds
```

#### id
Expand All @@ -79,7 +79,7 @@ The `id` filter matches a task's id.
$ docker node ps -f id=bg8c07zzg87di2mufeq51a2qp swarm-manager1

NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds
redis.7.bg8c07zzg87di2mufeq51a2qp redis:7.4.1 swarm-manager1 Running Running 5 seconds
```

#### label
Expand All @@ -93,8 +93,8 @@ The following filter matches tasks with the `usage` label regardless of its valu
$ docker node ps -f "label=usage"

NAME IMAGE NODE DESIRED STATE CURRENT STATE
redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 10 minutes
redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 9 minutes
redis.6.b465edgho06e318egmgjbqo4o redis:7.4.1 swarm-manager1 Running Running 10 minutes
redis.7.bg8c07zzg87di2mufeq51a2qp redis:7.4.1 swarm-manager1 Running Running 9 minutes
```


Expand Down
40 changes: 20 additions & 20 deletions docs/reference/commandline/service_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ Creates a service as described by the specified parameters.
### Create a service

```console
$ docker service create --name redis redis:3.0.6
$ docker service create --name redis redis:7.4.1

dmu1ept4cxcfe8k8lhtux3ro3

$ docker service create --mode global --name redis2 redis:3.0.6
$ docker service create --mode global --name redis2 redis:7.4.1

a8q9dasaafudfs8q8w32udass

$ docker service ls

ID NAME MODE REPLICAS IMAGE
dmu1ept4cxcf redis replicated 1/1 redis:3.0.6
a8q9dasaafud redis2 global 1/1 redis:3.0.6
dmu1ept4cxcf redis replicated 1/1 redis:7.4.1
a8q9dasaafud redis2 global 1/1 redis:7.4.1
```

#### <a name="with-registry-auth"></a> Create a service using an image on a private registry (--with-registry-auth)
Expand Down Expand Up @@ -140,7 +140,7 @@ Use the `--replicas` flag to set the number of replica tasks for a replicated
service. The following command creates a `redis` service with `5` replica tasks:

```console
$ docker service create --name redis --replicas=5 redis:3.0.6
$ docker service create --name redis --replicas=5 redis:7.4.1

4cdgfyky7ozwh3htjfw0d12qv
```
Expand All @@ -157,7 +157,7 @@ number of `RUNNING` tasks is `3`:
$ docker service ls

ID NAME MODE REPLICAS IMAGE
4cdgfyky7ozw redis replicated 3/5 redis:3.0.7
4cdgfyky7ozw redis replicated 3/5 redis:7.4.1
```

Once all the tasks are created and `RUNNING`, the actual number of tasks is
Expand All @@ -167,7 +167,7 @@ equal to the desired number:
$ docker service ls

ID NAME MODE REPLICAS IMAGE
4cdgfyky7ozw redis replicated 5/5 redis:3.0.7
4cdgfyky7ozw redis replicated 5/5 redis:7.4.1
```

### <a name="secret"></a> Create a service with secrets (--secret)
Expand All @@ -178,7 +178,7 @@ Use the `--secret` flag to give a container access to a
Create a service specifying a secret:

```console
$ docker service create --name redis --secret secret.json redis:3.0.6
$ docker service create --name redis --secret secret.json redis:7.4.1

4cdgfyky7ozwh3htjfw0d12qv
```
Expand All @@ -189,7 +189,7 @@ Create a service specifying the secret, target, user/group ID, and mode:
$ docker service create --name redis \
--secret source=ssh-key,target=ssh \
--secret source=app-key,target=app,uid=1000,gid=1001,mode=0400 \
redis:3.0.6
redis:7.4.1

4cdgfyky7ozwh3htjfw0d12qv
```
Expand All @@ -215,14 +215,14 @@ pre-exist in the container. The `mode` is specified as a 4-number sequence such
as `0755`.

```console
$ docker service create --name=redis --config redis-conf redis:3.0.6
$ docker service create --name=redis --config redis-conf redis:7.4.1
```

Create a service with a config and specify the target location and file mode:

```console
$ docker service create --name redis \
--config source=redis-conf,target=/etc/redis/redis.conf,mode=0400 redis:3.0.6
--config source=redis-conf,target=/etc/redis/redis.conf,mode=0400 redis:7.4.1
```

To grant a service access to multiple configs, use multiple `--config` flags.
Expand All @@ -239,7 +239,7 @@ $ docker service create \
--name redis \
--update-delay 10s \
--update-parallelism 2 \
redis:3.0.6
redis:7.4.1
```

When you run a [service update](service_update.md), the scheduler updates a
Expand All @@ -256,7 +256,7 @@ $ docker service create \
--name redis_2 \
--replicas 5 \
--env MYVAR=foo \
redis:3.0.6
redis:7.4.1
```

To specify multiple environment variables, specify multiple `--env` flags, each
Expand All @@ -268,7 +268,7 @@ $ docker service create \
--replicas 5 \
--env MYVAR=foo \
--env MYVAR2=bar \
redis:3.0.6
redis:7.4.1
```

### <a name="hostname"></a> Create a service with specific hostname (--hostname)
Expand All @@ -277,7 +277,7 @@ This option sets the docker service containers hostname to a specific string.
For example:

```console
$ docker service create --name redis --hostname myredis redis:3.0.6
$ docker service create --name redis --hostname myredis redis:7.4.1
```

### <a name="label"></a> Set metadata on a service (-l, --label)
Expand All @@ -290,7 +290,7 @@ $ docker service create \
--name redis_2 \
--label com.example.foo="bar" \
--label bar=baz \
redis:3.0.6
redis:7.4.1
```

For more information about labels, refer to [apply custom
Expand Down Expand Up @@ -679,7 +679,7 @@ The following command creates a global service:
$ docker service create \
--name redis_2 \
--mode global \
redis:3.0.6
redis:7.4.1
```

### <a name="constraint"></a> Specify service constraints (--constraint)
Expand Down Expand Up @@ -712,7 +712,7 @@ $ docker service create \
--name redis_2 \
--constraint node.platform.os==linux \
--constraint node.labels.type==queue \
redis:3.0.6
redis:7.4.1
```

If the service constraints exclude all nodes in the cluster, a message is printed
Expand Down Expand Up @@ -760,7 +760,7 @@ $ docker service create \
--replicas 9 \
--name redis_2 \
--placement-pref spread=node.labels.datacenter \
redis:3.0.6
redis:7.4.1
```

This uses `--placement-pref` with a `spread` strategy (currently the only
Expand Down Expand Up @@ -812,7 +812,7 @@ $ docker service create \
--name redis_2 \
--placement-pref 'spread=node.labels.datacenter' \
--placement-pref 'spread=node.labels.rack' \
redis:3.0.6
redis:7.4.1
```

When updating a service with `docker service update`, `--placement-pref-add`
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/commandline/service_inspect.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For example, given the following service;
```console
$ docker service ls
ID NAME MODE REPLICAS IMAGE
dmu1ept4cxcf redis replicated 3/3 redis:3.0.6
dmu1ept4cxcf redis replicated 3/3 redis:7.4.1
```

Both `docker service inspect redis`, and `docker service inspect dmu1ept4cxcf`
Expand All @@ -65,7 +65,7 @@ The output is in JSON format, for example:
"Name": "redis",
"TaskTemplate": {
"ContainerSpec": {
"Image": "redis:3.0.6"
"Image": "redis:7.4.1"
},
"Resources": {
"Limits": {},
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/commandline/service_ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ docker service ls

ID NAME MODE REPLICAS IMAGE
c8wgl7q4ndfd frontend replicated 5/5 nginx:alpine
dmu1ept4cxcf redis replicated 3/3 redis:3.0.6
dmu1ept4cxcf redis replicated 3/3 redis:7.4.1
iwe3278osahj mongo global 7/7 mongo:3.3
hh08h9uu8uwr job replicated-job 1/1 (3/5 completed) nginx:latest
```
Expand Down Expand Up @@ -68,7 +68,7 @@ The following filter matches services with an ID starting with `0bcjw`:
```console
$ docker service ls -f "id=0bcjw"
ID NAME MODE REPLICAS IMAGE
0bcjwfh8ychr redis replicated 1/1 redis:3.0.6
0bcjwfh8ychr redis replicated 1/1 redis:7.4.1
```

#### label
Expand All @@ -84,7 +84,7 @@ $ docker service ls --filter label=project
ID NAME MODE REPLICAS IMAGE
01sl1rp6nj5u frontend2 replicated 1/1 nginx:alpine
36xvvwwauej0 frontend replicated 5/5 nginx:alpine
74nzcxxjv6fq backend replicated 3/3 redis:3.0.6
74nzcxxjv6fq backend replicated 3/3 redis:7.4.1
```

The following filter matches only services with the `project` label with the
Expand All @@ -94,7 +94,7 @@ The following filter matches only services with the `project` label with the
$ docker service ls --filter label=project=project-a
ID NAME MODE REPLICAS IMAGE
36xvvwwauej0 frontend replicated 5/5 nginx:alpine
74nzcxxjv6fq backend replicated 3/3 redis:3.0.6
74nzcxxjv6fq backend replicated 3/3 redis:7.4.1
```

#### mode
Expand All @@ -118,7 +118,7 @@ The following filter matches services with a name starting with `redis`.
```console
$ docker service ls --filter name=redis
ID NAME MODE REPLICAS IMAGE
0bcjwfh8ychr redis replicated 1/1 redis:3.0.6
0bcjwfh8ychr redis replicated 1/1 redis:7.4.1
```

### <a name="format"></a> Format the output (--format)
Expand Down
Loading
Loading