Created
November 16, 2016 21:33
-
-
Save dlindahl/57dca2309175a65eeb6f7f7a794333a4 to your computer and use it in GitHub Desktop.
ETA Docker blog post code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
socat -u UNIX-LISTEN:/dev/log,fork STDOUT | | |
stdbuf -o0 tr '\n<' '<\n' | | |
stdbuf -o0 paste -sd\\n - -| | |
sed -e'/^[0-9]\{1,\}>/!{$!H;1h;$!d'\ | |
-e\} -e'x;y/\n</<\n/;s//<&/' \ | |
-ew\ /dev/fd/1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:jessie | |
RUN apt-get install socat | |
ENTRYPOINT [ "docker-entrypoint.sh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment