Skip to content

Commit 3cbe974

Browse files
committed
Add a Dockerfile to run the Feed Validator.
Run the Validator in a Stretch container, with Apache 2 and Python 2.7.
1 parent bb94e20 commit 3cbe974

File tree

3 files changed

+50
-31
lines changed

3 files changed

+50
-31
lines changed

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM debian:stretch
2+
3+
RUN apt-get update
4+
RUN apt-get --yes install apache2
5+
RUN apt-get --yes install python
6+
7+
RUN a2dissite 000-default
8+
9+
RUN a2enmod cgid
10+
RUN a2enmod rewrite
11+
RUN echo 'ServerName feedvalidator.org' >>/etc/apache2/apache2.conf
12+
13+
WORKDIR /feedvalidator
14+
15+
ADD . /feedvalidator
16+
ADD sites-available-feedvalidator.conf /etc/apache2/sites-available/feedvalidator.conf
17+
18+
RUN a2ensite feedvalidator
19+
20+
EXPOSE 80
21+
22+
ENV HTTP_HOST https://feedvalidator.org/
23+
ENV SCRIPT_NAME check.cgi
24+
ENV SCRIPT_FILENAME /feedvalidator/check.cgi
25+
26+
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]

sites-available-default

Lines changed: 0 additions & 31 deletions
This file was deleted.

sites-available-feedvalidator.conf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<VirtualHost *:80>
2+
ServerAdmin webmaster@localhost
3+
4+
DocumentRoot /feedvalidator
5+
<Directory /feedvalidator>
6+
Require all granted
7+
8+
Options +ExecCGI -MultiViews
9+
AddHandler cgi-script .cgi
10+
AddType image/x-icon ico
11+
12+
RewriteRule ^check$ check.cgi
13+
14+
DirectoryIndex index.html check.cgi
15+
</Directory>
16+
17+
ErrorLog ${APACHE_LOG_DIR}/error.log
18+
19+
# Possible values include: debug, info, notice, warn, error, crit,
20+
# alert, emerg.
21+
LogLevel warn
22+
23+
CustomLog ${APACHE_LOG_DIR}/access.log combined
24+
</VirtualHost>

0 commit comments

Comments
 (0)