-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
45 lines (35 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM ubuntu:trusty
MAINTAINER Chris Hardekopf <[email protected]>
# Install websvn
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y websvn \
apache2-utils && \
rm -rf /var/lib/apt/lists/*
# Replace the http URL in wsvn.php
RUN perl -pi -e \
"s/^\\\$locwebsvnhttp =.+;\$/\\\$locwebsvnhttp = '';/g" \
/etc/websvn/wsvn.php
# Use parent path for svn archives
RUN perl -pi -e \
"s/\/\/ \\\$config->parentPath([^,]+);\$/\\\$config->parentPath('\/svn');/g" \
/etc/websvn/config.php
# Enable MultiViews
RUN perl -pi -e \
"s/\/\/ \\\$config->useMultiViews([^,]+);\$/\\\$config->useMultiViews();/g" \
/etc/websvn/config.php
# Set up auth
RUN perl -pi -e \
"s/\/\/ \\\$config->useAuthenticationFile([^,]+);/\\\$config->useAuthenticationFile('\/svn\/svn.authz');/g" \
/etc/websvn/config.php
# Add the websv apache configuration and enable the site
ADD websvn.conf /etc/apache2/sites-available/
RUN a2enmod expires auth_digest authz_groupfile && \
a2dissite 000-default && a2ensite websvn
# Add the start script
ADD start /opt/
# Archives and configuration are stored in /svn
VOLUME [ "/svn" ]
# Expose public port for web server
EXPOSE 80
# Initialize configuration and run the web server
CMD [ "/opt/start" ]