Skip to content

Instantly share code, notes, and snippets.

@NikoWoot
Created January 14, 2021 16:38
Show Gist options
  • Save NikoWoot/ab30873e8ef1cc61e2c90ddf319dae03 to your computer and use it in GitHub Desktop.
Save NikoWoot/ab30873e8ef1cc61e2c90ddf319dae03 to your computer and use it in GitHub Desktop.
Create custom file descriptor
mkfifo /tmp/stdout /tmp/stderr
chmod 0666 /tmp/stdout /tmp/stderr
# Have the main Docker process tail the files to produce stdout and stderr
# for the main process that Docker will actually show in docker logs.
tail -f /tmp/stdout &
tail -f /tmp/stderr >&2 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment