kas-container: add --log-driver=none as default runtime arg

Container engines per default log all container output into journald
(Podman) or a json file (Docker).

A build with kas-container/bitbake containes lots of useless build
output like progress lines, etc.

In case of Podman, where journald is used, this means that all this is
spammed into the journald buffer and possible also send to ttys or even
serial ttys. This might make sense for containers that output only
status information about running services, but for a build process, this
is mostly just spamming and causes important information to be lost.

Since the stdout/stderr output of the container is used for
kas-container ordinarily, the background logging from the container
image can be deactivated.

Therefor add the `--log-driver=none` parameter to all container
runtimes command lines.

Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Claudius Heine 2022-09-19 15:53:17 +02:00 committed by Jan Kiszka
parent 10aa308334
commit 26a7ab8f48

View File

@ -161,13 +161,15 @@ if [ -z "${KAS_CONTAINER_ENGINE}" ]; then
fi
fi
KAS_RUNTIME_ARGS="--log-driver=none"
case "${KAS_CONTAINER_ENGINE}" in
docker)
KAS_CONTAINER_COMMAND="docker"
;;
podman)
KAS_CONTAINER_COMMAND="podman"
KAS_RUNTIME_ARGS="--security-opt label=disable"
KAS_RUNTIME_ARGS="${KAS_RUNTIME_ARGS} --security-opt label=disable"
;;
*)
echo "$0: unknown container engine '${KAS_CONTAINER_ENGINE}'" >&2