From 348f2df0c09e2e3b517add5271e6eee583800be3 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 5 Oct 2020 16:33:09 -0400 Subject: Support max_size logoptions Docker supports log-opt max_size and so does conmon (ALthough poorly). Adding support for this allows users to at least make sure their containers logs do not become a DOS vector. Signed-off-by: Daniel J Walsh --- docs/source/markdown/podman-create.1.md | 18 ++++++++++++------ docs/source/markdown/podman-run.1.md | 16 +++++++++++----- 2 files changed, 23 insertions(+), 11 deletions(-) (limited to 'docs/source') diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md index 28c340d2f..3303ae572 100644 --- a/docs/source/markdown/podman-create.1.md +++ b/docs/source/markdown/podman-create.1.md @@ -438,16 +438,22 @@ Not implemented Logging driver for the container. Currently available options are *k8s-file*, *journald*, and *none*, with *json-file* aliased to *k8s-file* for scripting compatibility. -**--log-opt**=*path* +**--log-opt**=*name*=*value* -Logging driver specific options. Used to set the path to the container log file. For example: +Set custom logging configuration. The following *name*s are supported: -`--log-opt path=/var/log/container/mycontainer.json` +- **path**: specify a path to the log file +(e.g. **--log-opt path=/var/log/container/mycontainer.json**); -**--log-opt**=*tag* +- **max-size**: specify a max size of the log file +(e.g. **--log-opt max-size=10mb**); -Set custom logging configuration. Presently supports the `tag` option -which specified a custom log tag for the container. For example: +- **tag**: specify a custom log tag for the container +(e.g. **--log-opt tag="{{.ImageName}}"**. + +It supports the same keys as **podman inspect --format**. + +This option is currently supported only by the **journald** log driver. `--log-opt tag="{{.ImageName}}"` diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index a27b1b175..d9bcc49ae 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -452,12 +452,18 @@ Logging driver for the container. Currently available options are **k8s-file**, **--log-opt**=*name*=*value* +Logging driver specific options. + Set custom logging configuration. The following *name*s are supported: -- **path**: specify a path to the log file (e.g. -**--log-opt path=/var/log/container/mycontainer.json**); -- **tag**: specify a custom log tag for the container (e.g. -**--log-opt tag="{{.ImageName}}"**. It supports the same -keys as **podman inspect --format**. + +**path**: specify a path to the log file + (e.g. **--log-opt path=/var/log/container/mycontainer.json**); + +**max-size**: specify a max size of the log file + (e.g. **--log-opt max-size=10mb**); + +**tag**: specify a custom log tag for the container + (e.g. **--log-opt tag="{{.ImageName}}"**. This option is currently supported only by the **journald** log driver. -- cgit v1.2.3-54-g00ecf