Skip to content

Commit d205608

Browse files
committed
common: clarify containers.conf doc for env
When using http proxy vars in the engine section they can still get leaked because http_proxy defaults to true. Fixes: https://issues.redhat.com/browse/RHEL-127541 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
1 parent 2371269 commit d205608

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

common/docs/containers.conf.5.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,9 @@ Logging driver for the container. Currently available options are k8s-file, jour
298298

299299
**log_path**=""
300300

301-
Default path for container logs to be stored in. When empty, logs will be stored
301+
Default path for container logs to be stored in. When empty, logs will be stored
302302
in the container's default storage and removed when the container is removed.
303-
A subdirectory named with the container ID will be created under the specified
303+
A subdirectory named with the container ID will be created under the specified
304304
path, and the log file will have the default name `ctr.log` within that directory.
305305
This option can be overridden by the `--log-opt` flag.
306306

@@ -621,10 +621,13 @@ Disabling this can save memory.
621621

622622
**env**=[]
623623

624-
Environment variables to be used when running the container engine (e.g., Podman, Buildah). For example "http_proxy=internal.proxy.company.com".
625-
Note these environment variables will not be used within the container. Set the env section under [containers] table,
624+
Environment variables to be used when running the container engine (e.g., Podman, Buildah). For example "MYVAR=value".
625+
These environment variables will not be used within the container. Set the env section under the [containers] table,
626626
if you want to set environment variables for the container.
627627

628+
Note when using this to set http proxy variables then they might get leaked into the container depending on
629+
if `http_proxy` (under the [containers] table) is set to to true (default) or false.
630+
628631
**events_logfile_path**=""
629632

630633
Define where event logs will be stored, when events_logger is "file".

common/pkg/config/containers.conf

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ default_sysctls = [
216216
#
217217
#log_driver = "k8s-file"
218218

219-
# Default path for container logs to be stored in. When empty, logs will be stored
219+
# Default path for container logs to be stored in. When empty, logs will be stored
220220
# in the container's default storage and removed when the container is removed.
221-
# A subdirectory named with the container ID will be created under the specified
221+
# A subdirectory named with the container ID will be created under the specified
222222
# path, and the log file will have the default name `ctr.log` within that directory.
223223
# This option can be overridden by the `--log-opt` flag.
224-
#
224+
#
225225
#log_path = ""
226226

227227
# Maximum size allowed for the container log file. Negative numbers indicate
@@ -542,10 +542,14 @@ default_sysctls = [
542542
#
543543
#enable_port_reservation = true
544544

545-
# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
546-
# For example "http_proxy=internal.proxy.company.com".
547-
# Note these environment variables will not be used within the container.
548-
# Set the env section under [containers] table, if you want to set environment variables for the container.
545+
# Environment variables to be used when running the container engine (e.g.,
546+
# Podman, Buildah). For example "MYVAR=value". These environment variables
547+
# will not be used within the container. Set the env section under the
548+
# [containers] table, if you want to set environment variables for the
549+
# container.
550+
# Note when using this to set http proxy variables then they might get
551+
# leaked into the container depending on if `http_proxy` (under the
552+
# [containers] table) is set to to true (default) or false.
549553
#
550554
#env = []
551555

common/pkg/config/containers.conf-freebsd

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ default_sysctls = [
169169
#
170170
#log_driver = "k8s-file"
171171

172-
# Default path for container logs to be stored in. When empty, logs will be stored
172+
# Default path for container logs to be stored in. When empty, logs will be stored
173173
# in the container's default storage and removed when the container is removed.
174-
# A subdirectory named with the container ID will be created under the specified
174+
# A subdirectory named with the container ID will be created under the specified
175175
# path, and the log file will have the default name `ctr.log` within that directory.
176176
# This option can be overridden by the `--log-opt` flag.
177-
#
177+
#
178178
#log_path = ""
179179

180180
# Maximum size allowed for the container log file. Negative numbers indicate
@@ -393,10 +393,14 @@ default_sysctls = [
393393
#
394394
#enable_port_reservation = true
395395

396-
# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
397-
# For example "http_proxy=internal.proxy.company.com".
398-
# Note these environment variables will not be used within the container.
399-
# Set the env section under [containers] table, if you want to set environment variables for the container.
396+
# Environment variables to be used when running the container engine (e.g.,
397+
# Podman, Buildah). For example "MYVAR=value". These environment variables
398+
# will not be used within the container. Set the env section under the
399+
# [containers] table, if you want to set environment variables for the
400+
# container.
401+
# Note when using this to set http proxy variables then they might get
402+
# leaked into the container depending on if `http_proxy` (under the
403+
# [containers] table) is set to to true (default) or false.
400404
#
401405
#env = []
402406

0 commit comments

Comments
 (0)