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

/config tier 1 refresh #18540

Merged
merged 29 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c176642
chore: tier 1 freshness: content/config/pruning.md
dvdksn Oct 26, 2023
657b347
chore: tier 1 freshness: content/config/labels-custom-metadata.md
dvdksn Oct 26, 2023
0ebfc4f
chore: tier 1 freshness: content/config/formatting.md
dvdksn Oct 26, 2023
3f1a01c
chore: tier 1 freshness: content/config/containers/live-restore.md
dvdksn Oct 26, 2023
173c7c4
chore: tier 1 freshness: content/config/containers/multi-service_cont…
dvdksn Oct 26, 2023
c63d0cd
chore: tier 1 freshness: content/config/containers/resource_constrain…
dvdksn Oct 26, 2023
e7f593e
chore: tier 1 freshness: content/config/containers/runmetrics.md
dvdksn Oct 26, 2023
33d7376
chore: tier 1 freshness: content/config/containers/logging/etwlogs.md
dvdksn Oct 27, 2023
d82daa0
chore: tier 1 freshness: content/config/containers/logging/fluentd.md
dvdksn Oct 27, 2023
3df1949
chore: tier 1 freshness: content/config/containers/logging/_index.md
dvdksn Oct 27, 2023
11d7363
chore: tier 1 freshness: content/config/containers/logging/awslogs.md
dvdksn Oct 27, 2023
36e36d0
chore: tier 1 freshness: content/config/containers/logging/configure.md
dvdksn Oct 27, 2023
b655974
chore: tier 1 freshness: content/config/containers/logging/dual-loggi…
dvdksn Oct 27, 2023
c5b7301
chore: tier 1 freshness: content/config/containers/logging/gcplogs.md
dvdksn Oct 27, 2023
2f0017e
chore: tier 1 freshness: content/config/containers/logging/gelf.md
dvdksn Oct 27, 2023
3569940
chore: tier 1 freshness: content/config/containers/logging/journald.md
dvdksn Oct 27, 2023
b44c3de
chore: tier 1 freshness: content/config/containers/logging/json-file.md
dvdksn Oct 27, 2023
b72a52f
chore: tier 1 freshness: content/config/containers/logging/local.md
dvdksn Oct 27, 2023
c960992
chore: tier 1 freshness: content/config/containers/logging/log_tags.md
dvdksn Oct 27, 2023
dc86c93
chore: tier 1 freshness: content/config/containers/logging/logentries.md
dvdksn Oct 27, 2023
5c1b17b
chore: tier 1 freshness: content/config/containers/logging/plugins.md
dvdksn Oct 27, 2023
ec07c18
chore: tier 1 freshness: content/config/containers/logging/splunk.md
dvdksn Oct 27, 2023
6f717a0
chore: tier 1 freshness: content/config/containers/logging/syslog.md
dvdksn Oct 27, 2023
0d707a2
chore: tier 1 freshness: content/config/daemon/logs.md
dvdksn Oct 27, 2023
aad4419
chore: tier 1 freshness: content/config/daemon/prometheus.md
dvdksn Oct 27, 2023
2ee99ab
chore: tier 1 freshness: content/config/daemon/remote-access.md
dvdksn Oct 27, 2023
dc0453c
chore: tier 1 freshness: content/config/daemon/systemd.md
dvdksn Oct 27, 2023
5061e71
chore: tier 1 freshness: content/config/daemon/troubleshoot.md
dvdksn Oct 27, 2023
0dd29dc
chore: tier 1 freshness: content/config/daemon/_index.md
dvdksn Oct 27, 2023
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
31 changes: 15 additions & 16 deletions content/config/containers/live-restore.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
description: How to keep containers running when the daemon isn't available.
description: Learn how to keep containers running when the daemon isn't available
keywords: docker, upgrade, daemon, dockerd, live-restore, daemonless container
title: Keep containers alive during daemon downtime
title: Live restore
aliases:
- /engine/admin/live-restore/
- /engine/admin/live-restore/
---

By default, when the Docker daemon terminates, it shuts down running containers.
Expand All @@ -14,15 +14,15 @@ or upgrades.

> **Note**
>
> Live restore is not supported on Windows containers, but it does work for
> Live restore isn't supported for Windows containers, but it does work for
> Linux containers running on Docker Desktop for Windows.

## Enable live restore

There are two ways to enable the live restore setting to keep containers alive
when the daemon becomes unavailable. **Only do one of the following**.

* Add the configuration to the daemon configuration file. On Linux, this
- Add the configuration to the daemon configuration file. On Linux, this
defaults to `/etc/docker/daemon.json`. On Docker Desktop for Mac or Docker
Desktop for Windows, select the Docker icon from the task bar, then click
**Settings** -> **Docker Engine**.
Expand All @@ -40,12 +40,11 @@ when the daemon becomes unavailable. **Only do one of the following**.
`systemd`, then use the command `systemctl reload docker`. Otherwise, send a
`SIGHUP` signal to the `dockerd` process.

* If you prefer, you can start the `dockerd` process manually with the
`--live-restore` flag. This approach is not recommended because it does not
- If you prefer, you can start the `dockerd` process manually with the
`--live-restore` flag. This approach isn't recommended because it doesn't
set up the environment that `systemd` or another process manager would use
when starting the Docker process. This can cause unexpected behavior.


## Live restore during upgrades

Live restore allows you to keep containers running across Docker daemon updates,
Expand All @@ -54,12 +53,12 @@ major (`YY.MM`) daemon upgrades.

If you skip releases during an upgrade, the daemon may not restore its
connection to the containers. If the daemon can't restore the connection, it
cannot manage the running containers and you must stop them manually.
can't manage the running containers and you must stop them manually.

## Live restore upon restart

The live restore option only works to restore containers if the daemon options,
such as bridge IP addresses and graph driver, did not change. If any of these
such as bridge IP addresses and graph driver, didn't change. If any of these
daemon-level configuration options have changed, the live restore may not work
and you may need to manually stop the containers.

Expand All @@ -71,12 +70,12 @@ data. The default buffer size is 64K. If the buffers fill, you must restart
the Docker daemon to flush them.

On Linux, you can modify the kernel's buffer size by changing
`/proc/sys/fs/pipe-max-size`. You cannot modify the buffer size on Docker Desktop for
`/proc/sys/fs/pipe-max-size`. You can't modify the buffer size on Docker Desktop for
Mac or Docker Desktop for Windows.

## Live restore and swarm mode
## Live restore and Swarm mode

The live restore option only pertains to standalone containers, and not to swarm
services. Swarm services are managed by swarm managers. If swarm managers are
not available, swarm services continue to run on worker nodes but cannot be
managed until enough swarm managers are available to maintain a quorum.
The live restore option only pertains to standalone containers, and not to Swarm
services. Swarm services are managed by Swarm managers. If Swarm managers are
not available, Swarm services continue to run on worker nodes but can't be
managed until enough Swarm managers are available to maintain a quorum.
12 changes: 6 additions & 6 deletions content/config/containers/logging/_index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
description: How to write to and view a container's logs
description: Learn how to write to, view, and configure a container's logs
keywords: docker, logging
title: View container logs
aliases:
- /engine/admin/logging/
- /engine/admin/logging/view_container_logs/
- /engine/admin/logging/
- /engine/admin/logging/view_container_logs/
---

The `docker logs` command shows information logged by a running container. The
`docker service logs` command shows information logged by all containers
participating in a service. The information that is logged and the format of the
participating in a service. The information that's logged and the format of the
log depends almost entirely on the container's endpoint command.

By default, `docker logs` or `docker service logs` shows the command's output
just as it would appear if you ran the command interactively in a terminal. UNIX
just as it would appear if you ran the command interactively in a terminal. Unix
and Linux commands typically open three I/O streams when they run, called
`STDIN`, `STDOUT`, and `STDERR`. `STDIN` is the command's input stream, which
may include input from the keyboard or input from another command. `STDOUT` is
Expand Down Expand Up @@ -50,4 +50,4 @@ its errors to `/proc/self/fd/2` (which is `STDERR`). See the
## Next steps

- Configure [logging drivers](configure.md).
- Write a [Dockerfile](../../../engine/reference/builder.md).
- Write a [Dockerfile](../../../engine/reference/builder.md).
50 changes: 23 additions & 27 deletions content/config/containers/logging/awslogs.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
description: Describes how to use the Amazon CloudWatch Logs logging driver.
description: Learn how to use the Amazon CloudWatch Logs logging driver with Docker Engine
keywords: AWS, Amazon, CloudWatch, logging, driver
title: Amazon CloudWatch Logs logging driver
aliases:
- /engine/reference/logging/awslogs/
- /engine/admin/logging/awslogs/
- /engine/reference/logging/awslogs/
- /engine/admin/logging/awslogs/
---

The `awslogs` logging driver sends container logs to
Expand Down Expand Up @@ -51,7 +51,7 @@ myservice:
options:
awslogs-region: us-east-1
```

## Amazon CloudWatch Logs options

You can add logging options to the `daemon.json` to set Docker-wide defaults,
Expand Down Expand Up @@ -108,7 +108,7 @@ specified, the container ID is used as the log stream.

### awslogs-create-group

Log driver returns an error by default if the log group does not exist. However, you can set the
Log driver returns an error by default if the log group doesn't exist. However, you can set the
`awslogs-create-group` to `true` to automatically create the log group as needed.
The `awslogs-create-group` option defaults to `false`.

Expand All @@ -128,7 +128,7 @@ $ docker run \

### awslogs-datetime-format

The `awslogs-datetime-format` option defines a multiline start pattern in [Python
The `awslogs-datetime-format` option defines a multi-line start pattern in [Python
`strftime` format](https://strftime.org). A log message consists of a line that
matches the pattern and any following lines that don't match the pattern. Thus
the matched line is the delimiter between log messages.
Expand All @@ -141,18 +141,17 @@ single entry.
This option always takes precedence if both `awslogs-datetime-format` and
`awslogs-multiline-pattern` are configured.


> **Note**
>
> Multiline logging performs regular expression parsing and matching of all log
> Multi-line logging performs regular expression parsing and matching of all log
> messages, which may have a negative impact on logging performance.

Consider the following log stream, where new log messages start with a
timestamp:

```console
[May 01, 2017 19:00:01] A message was logged
[May 01, 2017 19:00:04] Another multiline message was logged
[May 01, 2017 19:00:04] Another multi-line message was logged
Some random message
with some random words
[May 01, 2017 19:01:32] Another message was logged
Expand All @@ -178,7 +177,7 @@ This parses the logs into the following CloudWatch log events:
[May 01, 2017 19:00:01] A message was logged

# Second event
[May 01, 2017 19:00:04] Another multiline message was logged
[May 01, 2017 19:00:04] Another multi-line message was logged
Some random message
with some random words

Expand All @@ -189,7 +188,7 @@ with some random words
The following `strftime` codes are supported:

| Code | Meaning | Example |
|:-----|:-----------------------------------------------------------------|:---------|
| :--- | :--------------------------------------------------------------- | :------- |
| `%a` | Weekday abbreviated name. | Mon |
| `%A` | Weekday full name. | Monday |
| `%w` | Weekday as a decimal number where 0 is Sunday and 6 is Saturday. | 0 |
Expand All @@ -212,23 +211,24 @@ The following `strftime` codes are supported:

### awslogs-multiline-pattern

The `awslogs-multiline-pattern` option defines a multiline start pattern using a
The `awslogs-multiline-pattern` option defines a multi-line start pattern using a
regular expression. A log message consists of a line that matches the pattern
and any following lines that don't match the pattern. Thus the matched line is
the delimiter between log messages.

This option is ignored if `awslogs-datetime-format` is also configured.

> **Note**:
> Multiline logging performs regular expression parsing and matching of all log
> **Note**
>
> Multi-line logging performs regular expression parsing and matching of all log
> messages. This may have a negative impact on logging performance.

Consider the following log stream, where each log message should start with the
pattern `INFO`:

```console
INFO A message was logged
INFO Another multiline message was logged
INFO Another multi-line message was logged
Some random message
INFO Another message was logged
```
Expand All @@ -251,7 +251,7 @@ This parses the logs into the following CloudWatch log events:
INFO A message was logged

# Second event
INFO Another multiline message was logged
INFO Another multi-line message was logged
Some random message

# Third event
Expand All @@ -273,22 +273,21 @@ If not specified, the container ID is used as the log stream.

> **Note**
>
> The CloudWatch log API does not support `:` in the log name. This can cause
> The CloudWatch log API doesn't support `:` in the log name. This can cause
> some issues when using the `{{ .ImageName }}` as a tag,
> since a docker image has a format of `IMAGE:TAG`, such as `alpine:latest`.
> since a Docker image has a format of `IMAGE:TAG`, such as `alpine:latest`.
> Template markup can be used to get the proper format. To get the image name
> and the first 12 characters of the container ID, you can use:
>
>
>
> ```bash
> --log-opt tag='{{ with split .ImageName ":" }}{{join . "_"}}{{end}}-{{.ID}}'
> ```
>
>
> the output is something like: `alpine_latest-bf0072049c76`

### awslogs-force-flush-interval-seconds

The `awslogs` driver periodically flushs logs to CloudWatch.
The `awslogs` driver periodically flushes logs to CloudWatch.

The `awslogs-force-flush-interval-seconds` option changes log flush interval seconds.

Expand Down Expand Up @@ -319,13 +318,10 @@ and `logs:PutLogEvents` actions, as shown in the following example.
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Action": ["logs:CreateLogStream", "logs:PutLogEvents"],
"Effect": "Allow",
"Resource": "*"
}
]
}
```
```
Loading