Previous example was redirecting both stdout and stderr to PID 1's stdout.
The updated example maintains the separation of stdout and stderr into docker logs, where either stream can be redirected independently as per normal Docker behaviour. To output one of them, you redirect the stream you DON'T want:
Previous example was redirecting both
stdout
andstderr
to PID 1'sstdout
.The updated example maintains the separation of
stdout
andstderr
intodocker logs
, where either stream can be redirected independently as per normal Docker behaviour. To output one of them, you redirect the stream you DON'T want:Only show
stderr
:docker logs foo > /dev/null
Only show
stdout
:docker logs foo 2>/dev/null
Tests not run as this is a docs-only PR.