Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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 echo 'mkdir -p /var/run/apache2' >> /root/
RUN echo 'mkdir -p /var/lock/apache2' >> /root/
RUN echo '/usr/sbin/apache2 -D FOREGROUND' >> /root/
RUN chmod 755 /root/
CMD /root/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment