Subversion service over WebDav, intended to be used behind a proxy server
2.0K
This container will make available a WebDAV-provided Subversion repository. The source for this container is available on GitHub ryanwhowe/svn-proxy
Here are the dav_svn.conf settings that the image ships with
<Location /svn>
DAV svn
SVNParentPath /var/lib/svn/repos
SVNListParentPath On
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /var/lib/svn/access/svnpass
<IfModule mod_authz_svn.c>
AuthzSVNAccessFile /var/lib/svn/access/svnauth
</IfModule>
Require valid-user
</Location>
if you need to alter the settings, you can fork the source repo and build an image for your particular use case.
here is a sample compose.yaml to get an empty Subversion server running.
services:
svn:
image: ryanwhowe/svn-proxy:latest
restart: unless-stopped
ports:
- "8000:80"
volumes:
- svnData:/var/lib/svn
volumes:
svnData:
This will persist the repository information, including all access rules in the docker volume. This is recommended, trying to mount a data volume into the running container can produce permissions issues between the host and container file systems.
Add a new Repository
Attention: Any time a new repository is created you will need to reset the permissions and ownership to
www-data:www-datafor WebDav to be able to write to the repository
docker compose exec svn sh -c "svnadmin create /var/lib/svn/repos/{reponame}"
Add the user to the permissions file (you will be prompted for the password)
docker compose exec svn sh -c "htpasswd /var/lib/svn/access/svnpass {username}"
Establish an access file see svnBook for documentation on how to perform that.
docker compose exec svn sh -c "vim /var/lib/svn/access/svnauth"
Load a dump file, here are two different ways to pipe the dump file content into the container's load command.
docker compose exec -T svn sh -c "svnadmin load /var/lib/svn/repos/{reponame}" < {backupName}.dump
cat {backupName}.dump | docker compose exec -T svn sh -c "svnadmin load /var/lib/svn/repos/{reponame}"
Dump the repo from inside the container to a local external dump file
docker compose exec svn sh -c "svnadmin dump --quiet /var/lib/svn/repos/{reponame} " > {backupName}.dump
Dump the repo from inside the container to a local external dump.gz file, while streaming it through gzip.
docker compose exec svn sh -c "svnadmin dump --quiet /var/lib/svn/repos/{reponame} | gzip -9 " > {backupName}.dump.gz
RESETTING the directory permissions
docker compose exec svn sh -c "chown -R www-data:www-data /var/lib/svn"
Content type
Image
Digest
sha256:7df063d8f…
Size
84.9 MB
Last updated
8 months ago
docker pull ryanwhowe/svn-proxy