mirror of
https://github.com/willfarrell/docker-crontab.git
synced 2025-07-07 02:58:01 +02:00
#6 Added adduser
to the build script
This commit is contained in:
20
test_logging
Executable file
20
test_logging
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# This file is for testing the logging of docker output #8
|
||||
|
||||
LOG_FILE=./jobs.log
|
||||
touch ${LOG_FILE}
|
||||
UUID="xxxxxxxxxxxxxxxxx"
|
||||
|
||||
exec > >(read message; echo "${UUID} $(date) [info] $message" | tee -a ${LOG_FILE} )
|
||||
exec 2> >(read message; echo "${UUID} $(date) [error] $message" | tee -a ${LOG_FILE} >&2)
|
||||
|
||||
echo "Start"
|
||||
|
||||
docker run alpine sh -c 'while :; do echo "ping"; sleep 1; done'
|
||||
# [error] write /dev/stdout: broken pipe
|
||||
# --log-driver syslog <- errors
|
||||
# --log-driver none <- errors
|
||||
|
||||
echo "End"
|
Reference in New Issue
Block a user