Last active
September 26, 2020 03:41
-
-
Save likejazz/b07a220a1536de03c5b3de440f741b25 to your computer and use it in GitHub Desktop.
Apache Hello World 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 ubuntu:18.04 | |
# Install dependencies | |
RUN apt-get update && \ | |
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 && \ | |
echo 'mkdir -p /var/run/apache2' >> /root/run_apache.sh && \ | |
echo 'mkdir -p /var/lock/apache2' >> /root/run_apache.sh && \ | |
echo '/usr/sbin/apache2 -D FOREGROUND' >> /root/run_apache.sh && \ | |
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