Skip to content

Commit a49e97c

Browse files
committed
Add build variants for apache
1 parent 143a94d commit a49e97c

File tree

19 files changed

+352
-0
lines changed

19 files changed

+352
-0
lines changed

apache/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
apache/Variants

apache/Variants/jessie/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM eboraas/debian:jessie
2+
MAINTAINER Ed Boraas <[email protected]>
3+
4+
RUN apt-get update && apt-get -y install apache2 && apt-get clean
5+
6+
ENV APACHE_RUN_USER www-data
7+
ENV APACHE_RUN_GROUP www-data
8+
ENV APACHE_LOG_DIR /var/log/apache2
9+
10+
RUN /bin/ln -sf ../sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl
11+
RUN /bin/ln -sf ../mods-available/ssl.conf /etc/apache2/mods-enabled/
12+
RUN /bin/ln -sf ../mods-available/ssl.load /etc/apache2/mods-enabled/
13+
14+
EXPOSE 80
15+
EXPOSE 443
16+
17+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
18+

apache/Variants/jessie/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# README #
2+
3+
This is a simple Apache image, including SSL support. In order to use this image effectively, you'll need to mount:
4+
5+
- /var/www for your site content (e.g. using "-v /home/jdoe/mysite/:/var/www/")
6+
- /var/log/apache2, optionally, if you want to store logfiles visibly outside the container
7+
- /etc/ssl, optionally, if you wish to use SSL with real keys
8+
9+
## A note on SSL ##
10+
11+
As per the defaults, Apache will use the bundled "snakeoil" key when serving SSL. Obviously this isn't sufficient or advisable for production, so you'll want to mount your real keys onto /etc/ssl/. If you name them "certs/ssl-cert-snakeoil.pem" and "private/ssl-cert-snakeoil.key", you'll be able to get by with the default config. Otherwise, you'll want to include a revised site definition. If you don't want to use SSL, you can avoid forwarding port 443 when launching the container (see below).
12+
13+
## Simple Examples ##
14+
15+
Assuming you have your content at /home/jdoe/mysite/, the below will be sufficient to serve it. Note that many Docker users encourage mounting data from a storage container, rather than directly from the filesyetem.
16+
17+
- "It works!": `docker run -p 80:80 -p 443:443 -d eboraas/apache` and browse to the host's IP address using http or https
18+
- Serving actual content with SSL support: `docker run -p 80:80 -p 443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
19+
- ... without SSL support: `docker -p 80:80 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
20+
- ... using non-standard ports: `docker -p 8080:80 -p 8443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
21+

apache/Variants/latest/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM eboraas/debian:latest
2+
MAINTAINER Ed Boraas <[email protected]>
3+
4+
RUN apt-get update && apt-get -y install apache2 && apt-get clean
5+
6+
ENV APACHE_RUN_USER www-data
7+
ENV APACHE_RUN_GROUP www-data
8+
ENV APACHE_LOG_DIR /var/log/apache2
9+
10+
RUN /bin/ln -sf ../sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl
11+
RUN /bin/ln -sf ../mods-available/ssl.conf /etc/apache2/mods-enabled/
12+
RUN /bin/ln -sf ../mods-available/ssl.load /etc/apache2/mods-enabled/
13+
14+
EXPOSE 80
15+
EXPOSE 443
16+
17+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
18+

apache/Variants/latest/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# README #
2+
3+
This is a simple Apache image, including SSL support. In order to use this image effectively, you'll need to mount:
4+
5+
- /var/www for your site content (e.g. using "-v /home/jdoe/mysite/:/var/www/")
6+
- /var/log/apache2, optionally, if you want to store logfiles visibly outside the container
7+
- /etc/ssl, optionally, if you wish to use SSL with real keys
8+
9+
## A note on SSL ##
10+
11+
As per the defaults, Apache will use the bundled "snakeoil" key when serving SSL. Obviously this isn't sufficient or advisable for production, so you'll want to mount your real keys onto /etc/ssl/. If you name them "certs/ssl-cert-snakeoil.pem" and "private/ssl-cert-snakeoil.key", you'll be able to get by with the default config. Otherwise, you'll want to include a revised site definition. If you don't want to use SSL, you can avoid forwarding port 443 when launching the container (see below).
12+
13+
## Simple Examples ##
14+
15+
Assuming you have your content at /home/jdoe/mysite/, the below will be sufficient to serve it. Note that many Docker users encourage mounting data from a storage container, rather than directly from the filesyetem.
16+
17+
- "It works!": `docker run -p 80:80 -p 443:443 -d eboraas/apache` and browse to the host's IP address using http or https
18+
- Serving actual content with SSL support: `docker run -p 80:80 -p 443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
19+
- ... without SSL support: `docker -p 80:80 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
20+
- ... using non-standard ports: `docker -p 8080:80 -p 8443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
21+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM eboraas/debian:oldstable
2+
MAINTAINER Ed Boraas <[email protected]>
3+
4+
RUN apt-get update && apt-get -y install apache2 && apt-get clean
5+
6+
ENV APACHE_RUN_USER www-data
7+
ENV APACHE_RUN_GROUP www-data
8+
ENV APACHE_LOG_DIR /var/log/apache2
9+
10+
RUN /bin/ln -sf ../sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl
11+
RUN /bin/ln -sf ../mods-available/ssl.conf /etc/apache2/mods-enabled/
12+
RUN /bin/ln -sf ../mods-available/ssl.load /etc/apache2/mods-enabled/
13+
14+
EXPOSE 80
15+
EXPOSE 443
16+
17+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
18+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# README #
2+
3+
This is a simple Apache image, including SSL support. In order to use this image effectively, you'll need to mount:
4+
5+
- /var/www for your site content (e.g. using "-v /home/jdoe/mysite/:/var/www/")
6+
- /var/log/apache2, optionally, if you want to store logfiles visibly outside the container
7+
- /etc/ssl, optionally, if you wish to use SSL with real keys
8+
9+
## A note on SSL ##
10+
11+
As per the defaults, Apache will use the bundled "snakeoil" key when serving SSL. Obviously this isn't sufficient or advisable for production, so you'll want to mount your real keys onto /etc/ssl/. If you name them "certs/ssl-cert-snakeoil.pem" and "private/ssl-cert-snakeoil.key", you'll be able to get by with the default config. Otherwise, you'll want to include a revised site definition. If you don't want to use SSL, you can avoid forwarding port 443 when launching the container (see below).
12+
13+
## Simple Examples ##
14+
15+
Assuming you have your content at /home/jdoe/mysite/, the below will be sufficient to serve it. Note that many Docker users encourage mounting data from a storage container, rather than directly from the filesyetem.
16+
17+
- "It works!": `docker run -p 80:80 -p 443:443 -d eboraas/apache` and browse to the host's IP address using http or https
18+
- Serving actual content with SSL support: `docker run -p 80:80 -p 443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
19+
- ... without SSL support: `docker -p 80:80 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
20+
- ... using non-standard ports: `docker -p 8080:80 -p 8443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
21+

apache/Variants/sid/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM eboraas/debian:sid
2+
MAINTAINER Ed Boraas <[email protected]>
3+
4+
RUN apt-get update && apt-get -y install apache2 && apt-get clean
5+
6+
ENV APACHE_RUN_USER www-data
7+
ENV APACHE_RUN_GROUP www-data
8+
ENV APACHE_LOG_DIR /var/log/apache2
9+
10+
RUN /bin/ln -sf ../sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl
11+
RUN /bin/ln -sf ../mods-available/ssl.conf /etc/apache2/mods-enabled/
12+
RUN /bin/ln -sf ../mods-available/ssl.load /etc/apache2/mods-enabled/
13+
14+
EXPOSE 80
15+
EXPOSE 443
16+
17+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
18+

apache/Variants/sid/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# README #
2+
3+
This is a simple Apache image, including SSL support. In order to use this image effectively, you'll need to mount:
4+
5+
- /var/www for your site content (e.g. using "-v /home/jdoe/mysite/:/var/www/")
6+
- /var/log/apache2, optionally, if you want to store logfiles visibly outside the container
7+
- /etc/ssl, optionally, if you wish to use SSL with real keys
8+
9+
## A note on SSL ##
10+
11+
As per the defaults, Apache will use the bundled "snakeoil" key when serving SSL. Obviously this isn't sufficient or advisable for production, so you'll want to mount your real keys onto /etc/ssl/. If you name them "certs/ssl-cert-snakeoil.pem" and "private/ssl-cert-snakeoil.key", you'll be able to get by with the default config. Otherwise, you'll want to include a revised site definition. If you don't want to use SSL, you can avoid forwarding port 443 when launching the container (see below).
12+
13+
## Simple Examples ##
14+
15+
Assuming you have your content at /home/jdoe/mysite/, the below will be sufficient to serve it. Note that many Docker users encourage mounting data from a storage container, rather than directly from the filesyetem.
16+
17+
- "It works!": `docker run -p 80:80 -p 443:443 -d eboraas/apache` and browse to the host's IP address using http or https
18+
- Serving actual content with SSL support: `docker run -p 80:80 -p 443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
19+
- ... without SSL support: `docker -p 80:80 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
20+
- ... using non-standard ports: `docker -p 8080:80 -p 8443:443 -v /home/jdoe/mysite/:/var/www/ -d eboraas/apache`
21+

apache/Variants/squeeze/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM eboraas/debian:squeeze
2+
MAINTAINER Ed Boraas <[email protected]>
3+
4+
RUN apt-get update && apt-get -y install apache2 && apt-get clean
5+
6+
ENV APACHE_RUN_USER www-data
7+
ENV APACHE_RUN_GROUP www-data
8+
ENV APACHE_LOG_DIR /var/log/apache2
9+
10+
RUN /bin/ln -sf ../sites-available/default-ssl /etc/apache2/sites-enabled/001-default-ssl
11+
RUN /bin/ln -sf ../mods-available/ssl.conf /etc/apache2/mods-enabled/
12+
RUN /bin/ln -sf ../mods-available/ssl.load /etc/apache2/mods-enabled/
13+
14+
EXPOSE 80
15+
EXPOSE 443
16+
17+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
18+

0 commit comments

Comments
 (0)