Non blocking error message when Glances starts from a container (alpine-dev image) #2991

This commit is contained in:
nicolargo 2024-10-26 10:53:15 +02:00
parent ff1cde4ffb
commit 34da61647b
3 changed files with 15 additions and 6 deletions

View File

@ -15,6 +15,7 @@
# Include Config file
!/docker-compose/glances.conf
!/docker-files/docker-logger.json
# Include Binary file
!/docker-bin.sh

View File

@ -138,6 +138,10 @@ COPY --from=buildFull /venv /venv
# RELEASE: dev - to be compatible with CI
FROM full as dev
# Forward access and error logs to Docker's log collector
RUN ln -sf /dev/stdout /tmp/glances-root.log \
&& ln -sf /dev/stderr /var/log/error.log
# Add the specific logger configuration file for Docker dev
# All logs will be forwarded to stdout
COPY ./docker-files/docker-logger.json /app
ENV LOG_CFG=/app/docker-logger.json
WORKDIR /app
CMD /venv/bin/python3 -m glances $GLANCES_OPT

View File

@ -128,6 +128,10 @@ COPY --from=buildFull /venv /venv
FROM full as dev
ARG PYTHON_VERSION
# Forward access and error logs to Docker's log collector
RUN ln -sf /dev/stdout /tmp/glances-root.log \
&& ln -sf /dev/stderr /var/log/error.log
# Add the specific logger configuration file for Docker dev
# All logs will be forwarded to stdout
COPY ./docker-files/docker-logger.json /app
ENV LOG_CFG=/app/docker-logger.json
WORKDIR /app
CMD /venv/bin/python3 -m glances $GLANCES_OPT