- Start container
- Create
view.sh
- Create a FIFO with
mkfifo /tmp/view
- Have a writer on the FIFO: just leave
cat >/tmp/view
running somewhere - Run
socat TCP-LISTEN:8080,reuseaddr,fork EXEC:/path/to/view.sh
- Whenever you want to kick everybody out, you can kill socat or kill the
cat
process :-)
Created
October 28, 2014 05:50
-
-
Save jpetazzo/b76576ad5c63aa42992e to your computer and use it in GitHub Desktop.
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 | |
echo "Content-Type: text/plain" | |
echo "" | |
docker attach $CONTAINER_ID_OR_NAME </tmp/view |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment