It's a fork of https://github.com/elleFlorio/svn-docker & https://github.com/sea-kg/svn-docker
Lightweight container providing an SVN server, based on Alpine Linux and S6 process management (see here for details). The access to the server is possible via WebDav protocol (http://).
Components (Tag v3.22-lsio):
- Alpine Linux (3.22) with S6 Overlay
- svn + apache taken from Alpine Linux
- iF.SVNAdmin web-interface used from https://github.com/mfreiholz/iF.SVNAdmin
version: 1.7.0 - WebSVN web-interface used from https://github.com/websvnphp/websvn
version: 2.8.4 - Repos-Style XSLT Stylesheet used from https://github.com/rburgoyne/repos-style
Note:
Starting tag v3.20-lsio the volume mount moved from /data to /config. Please adapt your docker-compose.yml file accordingly.
latestlatest versionv3.22-lsiobased on linuxserver.io baseimage / Alpine Linux 3.22v3.21-lsiobased on linuxserver.io baseimage / Alpine Linux 3.21v3.20-lsiobased on linuxserver.io baseimage / Alpine Linux 3.20v3.20based on Alpine Linux 3.20v3.19based on Alpine Linux 3.19v3.18based on Alpine Linux 3.18v3.17based on Alpine Linux 3.17
To run the image, you can use the following command:
$ docker run \
--name svn-server \
-p 8080:80 \
-e SVN_SERVER_REPOSITORIES_URL=/svn \
-e WEBSVN_URL=/websvn \
-e WEBSVN_AUTH=2 \
-e SVN_SERVER_REPOS_STYLE_AUTH=2 \
-v `pwd`/data:/config \
docker.io/userid0x0/svn-dockerSVN_SERVER_REPOSITORIES_URLlocation of the SVN repo on the web interface
default:/svnSVN_SERVER_REPOS_STYLE_AUTHauthentification used for Repos-Style history functionality
default:20no authentification used (public access)1read access for all known users for all repositories2read access to all known users repectingsvnauthz
disables history functionality (security leak)
WEBSVN_URLlocation of the WebSVN web interface
default:/websvn
websvn will be disabled when the URL is emptyWEBSVN_AUTHauthentification used for WebSVN
default:20no authentification used (public access)1read access for all known users for all repositories2read access to all known users repectingsvnauthz(e.g. controlled via iF.SVNAdmin)
PUIDUserID
default:911PGIDGroupID
default:911
<data>/repositories- will be keep all repositories in subfolder in data<data>/subversion- configurations for subversion (passwd && subversion-access-control)<data>/svnadmin- svnadmin related<data>/websvn- websvn related
$ docker build --tag localhost/svn-docker .- http://localhost:8080/svnadmin - configuration
- http://localhost:8080/svn - with repositories
- http://localhost:8080/websvn - websvn access
Create a local data folder for persistent storage and start svn-docker e.g.
$ cd <mydir>
$ mkdir data
$ docker run --name svn-server -p 8080:80 -v `pwd`/data:/config docker.io/userid0x0/svn-dockerWith the first start /config will be inited automatically - folders/files/password - for easy start.
Defaults:
read-onlypermissions for all known users- login:
admin/ password:adminDon't forget change this
Login to
- http://localhost:8080/svnadmin (login:
admin/ password:adminDon't forget change this )
- Login to http://localhost:8080/svnadmin
- Use Repositories -> Add to create a first repository
<reponame> - Use Users -> Add to create a first user
<user> - Use Access-Paths and assign read-write privileges for
userto repository<reponame>
The screenshot assigns useralexread-writeprivileges to repositorytest.

Finally try to checkout a repository on your host machine:
$ cd <checkout>
# easy
$ svn checkout http://localhost:8080/svn/<reponame>
# with explicit username
$ svn checkout --username <user> http://localhost:8080/svn/<reponame>$ cd <checkout>/<reponame>
$ touch test.txt
$ svn add test.txt
$ svn commit -m "initial commit"Check the functionality by opening
within your favorite webbrowser.
It's recommended to use svnadmin to create user accounts/repositories.
For further information on how to configure Subversion, please refer to the official web page.