Last active
August 29, 2015 14:07
-
-
Save felixrabe/32d6f65876b79451fc55 to your computer and use it in GitHub Desktop.
Simple webserver in Bash for Raspberry Pi using Docker
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 sdhibit/rpi-raspbian | |
RUN apt-get update && apt-get install -y netcat-openbsd | |
RUN echo 'HTTP/1.1 200 OK' >> www | |
RUN echo 'Content-Type: text/html' >> www | |
RUN echo >> www | |
RUN echo '<h1>Hello <i>world!</i></h1>' >> www | |
EXPOSE 9999 | |
CMD ["/bin/bash", "-c", "while true ; do nc -l 9999 < www > /dev/null ; done"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment