feat: stderr logs

stderr output is added to logs, merges #49, also add stderr output to Dockerfile.unhealthy
This commit is contained in:
Jack Wills
2024-10-06 15:15:05 +00:00
parent 2221705ae0
commit 0aa2be3473
+1 -1
View File
@@ -12,6 +12,6 @@ HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD [ ! -f /tmp/healthy ] || exit 1 CMD [ ! -f /tmp/healthy ] || exit 1
# Start a basic loop that keeps the container running # Start a basic loop that keeps the container running
CMD ["sh", "-c", "while :; do echo 'Container is running but will be unhealthy'; sleep 30; done"] CMD ["sh", "-c", "while :; do >&2 echo 'Container is running but will be unhealthy (also printing to stderr)'; sleep 30; done"]
# docker build -t unhealthy-container . -f Dockerfile.unhealthy; docker run -d --name unhealthy unhealthy-container # docker build -t unhealthy-container . -f Dockerfile.unhealthy; docker run -d --name unhealthy unhealthy-container