Created
December 30, 2016 20:35
-
-
Save doomsbuster/bd645076f8a13cc639593eff109043f7 to your computer and use it in GitHub Desktop.
Apache Container
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:14.04 | |
MAINTAINER Mr. Doomsbuster <[email protected]> | |
RUN apt-get -y update && apt-get -y install \ | |
apache2 \ | |
&& rm -rf /var/lib/apt/lists/* | |
COPY entrypoint.sh /entrypoint.sh | |
RUN chmod 755 /entrypoint.sh | |
ENTRYPOINT ["/entrypoint.sh"] | |
EXPOSE 80 |
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
#!/bin/sh | |
if [ -z "$1" ] | |
then | |
exec "/usr/sbin/apachectl -D FOREGROUND" | |
else | |
exec "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this gist. I was looking for a way to automatically start up apache in a docker container.