Skip to content

Instantly share code, notes, and snippets.

@mikepfeiffer
Last active November 25, 2018 17:08
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 mikepfeiffer/eadb7521d404296d014c474a1eaba3d3 to your computer and use it in GitHub Desktop.
Save mikepfeiffer/eadb7521d404296d014c474a1eaba3d3 to your computer and use it in GitHub Desktop.
Sample Docker file
FROM ubuntu:16.04
# Install dependencies
RUN apt-get update
RUN apt-get -y install apache2
# Install apache and write hello world message
RUN echo 'Hello World!' > /var/www/html/index.html
# Configure apache
RUN echo '. /etc/apache2/envvars' > /root/run_apache.sh
RUN echo 'mkdir -p /var/run/apache2' >> /root/run_apache.sh
RUN echo 'mkdir -p /var/lock/apache2' >> /root/run_apache.sh
RUN echo '/usr/sbin/apache2 -D FOREGROUND' >> /root/run_apache.sh
RUN chmod 755 /root/run_apache.sh
EXPOSE 80
CMD /root/run_apache.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment