Browse Source

trying to run as user deploy

main
Holger Frey 3 years ago
parent
commit
e2c95fc14a
  1. 12
      Dockerfile
  2. 36
      dav_svn.conf

12
Dockerfile

@ -6,8 +6,20 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.10/community" >> /etc/apk/repo @@ -6,8 +6,20 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.10/community" >> /etc/apk/repo
#RUN apk add --no-cache gcc libc-dev libffi-dev openssl openssl-dev python3-dev
RUN apk add --no-cache openrc apache2 apache2-utils apache2-webdav mod_dav_svn subversion
# add user that will be used to install and run the application
RUN addgroup -g 1000 deploy
RUN adduser -D -u 1000 -G deploy deploy
# add svn configuration
ADD dav_svn.conf /etc/apache2/conf.d/dav_svn.conf
# create writable directory for dav lock file
RUN mkdir /var/lib/dav/
RUN chown deploy:deploy /var/lib/dav/
# apache should run as user deploy
RUN sed -r 's/(User|Group) apache/\1 deploy/' /etc/apache2/httpd.conf > /etc/apache2/httpd.conf
RUN openrc
RUN touch /run/openrc/softlevel
RUN rc-update add apache2

36
dav_svn.conf

@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache2/mod_authz_svn.so
<VirtualHost 127.0.0.1:8000>
<Location />
DAV svn
SVNParentPath /data
SVNListParentPath On
SVNAutoversioning on
ModMimeUsePathInfo on
AuthType Basic
AuthName "svn"
AuthUserFile /data/.htpasswd
AuthzSVNAccessFile /data/authz
Require valid-user
</Location>
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache2/mod_authz_svn.so
<VirtualHost 127.0.0.1:8000>
<Location />
DAV svn
SVNParentPath /data
SVNListParentPath On
SVNAutoversioning on
ModMimeUsePathInfo on
AuthType Basic
AuthName "svn"
AuthUserFile /data/.htpasswd
AuthzSVNAccessFile /data/authz
Require valid-user
</Location>
</VirtualHost>
Loading…
Cancel
Save