From 470a362413c8fc5e981404025b5e0244a40fbfad Mon Sep 17 00:00:00 2001 From: Trygve Aspenes Date: Fri, 15 Nov 2024 11:53:11 +0100 Subject: [PATCH] use /dev/stdout --- containers/fastapi/Dockerfile | 2 +- docker-entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/fastapi/Dockerfile b/containers/fastapi/Dockerfile index b7a9a7e..4194c91 100644 --- a/containers/fastapi/Dockerfile +++ b/containers/fastapi/Dockerfile @@ -85,4 +85,4 @@ COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh RUN mkdir -pv /usr/share/unit/welcome && chown -R $MAMBA_USER:$MAMBA_USER /usr/share/unit COPY --chown=$MAMBA_USER:$MAMBA_USER welcome.* /usr/share/unit/welcome/ ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] -CMD unitd --no-daemon --control unix:/var/run/unit/control.unit.sock --statedir /var/lib/unit --pid /var/run/unit/unit.pid --log /proc/1/fd/1 | tee /var/log/unit/unit.log +CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/unit/control.unit.sock", "--statedir", "/var/lib/unit", "--pid", "/var/run/unit/unit.pid", "--log", "/proc/1/fd/1"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 91adccb..2097dc6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -29,7 +29,7 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then echo "$0: /var/lib/unit/ is not empty, skipping initial configuration..." else echo "$0: Launching Unit daemon to perform initial configuration..." - /usr/sbin/$1 --control unix:/var/run/unit/control.unit.sock --log /proc/1/fd/1 --statedir /var/lib/unit --pid /var/run/unit/unit.pid + /usr/sbin/$1 --control unix:/var/run/unit/control.unit.sock --log /dev/stdout --statedir /var/lib/unit --pid /var/run/unit/unit.pid for i in $(/usr/bin/seq $WAITLOOPS); do if [ ! -S /var/run/unit/control.unit.sock ]; then @@ -101,4 +101,4 @@ if [ "$1" = "unitd" ] || [ "$1" = "unitd-debug" ]; then fi fi -exec "$@" +exec "$@" 2>&1 | tee -a /var/log/unit/unit.log \ No newline at end of file