Skip to content

Instantly share code, notes, and snippets.

@lightxu
Last active September 12, 2015 00:06
Show Gist options
  • Save lightxu/968615a6b889d4cd82f8 to your computer and use it in GitHub Desktop.
Save lightxu/968615a6b889d4cd82f8 to your computer and use it in GitHub Desktop.
Play docker log
play_log:
build: .
from ubuntu
RUN ln -sf /dev/stdout /log
CMD while true; do echo "test\n" >/log; sleep 1; done
@lightxu
Copy link
Author

lightxu commented Sep 12, 2015

to run docker:
docker built -t play_log .
docker run play_log

@lightxu
Copy link
Author

lightxu commented Sep 12, 2015

to run docker-compose:
docker-compose up -d
docker-compose logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment