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.20-lsio
):
- Alpine Linux (3.20) with S6 Overlay
- svn + apache taken from Alpine Linux
- iF.SVNAdmin web-interface used from https://github.com/mfreiholz/iF.SVNAdmin
version: 1.6.2 + some patches for PHP8.3 - 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.
latest
latest versionv3.20-lsio
based on linuxserver.io baseimage / Alpine Linux 3.20v3.20
based on Alpine Linux 3.20v3.19
based on Alpine Linux 3.19v3.18
based on Alpine Linux 3.18v3.17
based 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-docker
SVN_SERVER_REPOSITORIES_URL
location of the SVN repo on the web interface
default:/svn
SVN_SERVER_REPOS_STYLE_AUTH
authentification used for Repos-Style history functionality
default:2
0
no authentification used (public access)1
read access for all known users for all repositories2
read access to all known users repectingsvnauthz
disables history functionality (security leak)
WEBSVN_URL
location of the WebSVN web interface
default:/websvn
websvn will be disabled when the URL is emptyWEBSVN_AUTH
authentification used for WebSVN
default:2
0
no authentification used (public access)1
read access for all known users for all repositories2
read access to all known users repectingsvnauthz
(e.g. controlled via iF.SVNAdmin)
PUID
UserID
default:911
PGID
GroupID
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-docker
With the first start /config
will be inited automatically - folders/files/password - for easy start.
Defaults:
read-only
permissions for all known users- login:
admin
/ password:admin
Don't forget change this
Login to
- http://localhost:8080/svnadmin (login:
admin
/ password:admin
Don'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
user
to repository<reponame>
The screenshot assigns useralex
read-write
privileges 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.