This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 106
/
Dockerfile
47 lines (39 loc) · 1.74 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
44
45
46
47
# Alpine Linux with s6 service management
FROM smebberson/alpine-base:3.2.0
# Install Apache2 and other stuff needed to access svn via WebDav
# Install svn
# Installing utilities for SVNADMIN frontend
# Create required folders
# Create the authentication file for http access
# Getting SVNADMIN interface
RUN apk add --no-cache apache2 apache2-utils apache2-webdav mod_dav_svn &&\
apk add --no-cache subversion &&\
apk add --no-cache wget unzip php7 php7-apache2 php7-session php7-json php7-ldap &&\
apk add --no-cache php7-xml &&\
sed -i 's/;extension=ldap/extension=ldap/' /etc/php7/php.ini &&\
mkdir -p /run/apache2/ &&\
mkdir /home/svn/ &&\
mkdir /etc/subversion &&\
touch /etc/subversion/passwd &&\
wget --no-check-certificate https://github.com/mfreiholz/iF.SVNAdmin/archive/stable-1.6.2.zip &&\
unzip stable-1.6.2.zip -d /opt &&\
rm stable-1.6.2.zip &&\
mv /opt/iF.SVNAdmin-stable-1.6.2 /opt/svnadmin &&\
ln -s /opt/svnadmin /var/www/localhost/htdocs/svnadmin &&\
chmod -R 777 /opt/svnadmin/data
# Solve a security issue (https://alpinelinux.org/posts/Docker-image-vulnerability-CVE-2019-5021.html)
RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
# Fixing https://github.com/mfreiholz/iF.SVNAdmin/issues/118
ADD svnadmin/classes/util/global.func.php /opt/svnadmin/classes/util/global.func.php
# Add services configurations
ADD apache/ /etc/services.d/apache/
ADD subversion/ /etc/services.d/subversion/
# Add SVNAuth file
ADD subversion-access-control /etc/subversion/subversion-access-control
RUN chmod a+w /etc/subversion/* && chmod a+w /home/svn
# Add WebDav configuration
ADD dav_svn.conf /etc/apache2/conf.d/dav_svn.conf
# Set HOME in non /root folder
ENV HOME /home
# Expose ports for http and custom protocol access
EXPOSE 80 443 3690