Skip to content

Instantly share code, notes, and snippets.

@mohan43u
Created July 10, 2021 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohan43u/2ee5704d65833fd5bd98564a75c8f81a to your computer and use it in GitHub Desktop.
Save mohan43u/2ee5704d65833fd5bd98564a75c8f81a to your computer and use it in GitHub Desktop.
FROM alpine
RUN echo -e '#!/bin/sh\n\
apk update\n\
apk upgrade\n\
apk add python3\n\
mkdir -p /var/www/helloworld\n\
echo "<html><head><title>Hello World</title><body><h3>Hello World</h3></body></html>" >/var/www/helloworld/index.html' >/tmp/script &&\
chmod 755 /tmp/script &&\
/tmp/script
EXPOSE 80
ENTRYPOINT ["/usr/bin/python3", "-m", "http.server", "--directory", "/var/www/helloworld", "80"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment