Skip to content

userid0x0/svn-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Image Build

It's a fork of https://github.com/elleFlorio/svn-docker & https://github.com/sea-kg/svn-docker

Description

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):

Note: Starting tag v3.20-lsio the volume mount moved from /data to /config. Please adapt your docker-compose.yml file accordingly.

Tags

  • latest latest version
  • v3.20-lsio based on linuxserver.io baseimage / Alpine Linux 3.20
  • v3.20 based on Alpine Linux 3.20
  • v3.19 based on Alpine Linux 3.19
  • v3.18 based on Alpine Linux 3.18
  • v3.17 based on Alpine Linux 3.17

How to run

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

Environment variables

  • 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 repositories
    • 2 read access to all known users repecting svnauthz
      disables history functionality (security leak)
  • WEBSVN_URL location of the WebSVN web interface
    default: /websvn
    websvn will be disabled when the URL is empty
  • WEBSVN_AUTH authentification used for WebSVN
    default: 2
    • 0 no authentification used (public access)
    • 1 read access for all known users for all repositories
    • 2 read access to all known users repecting svnauthz (e.g. controlled via iF.SVNAdmin)
  • PUID UserID
    default: 911
  • PGID GroupID
    default: 911

Volume /config

  • <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

Building

$ docker build --tag localhost/svn-docker .

URLs

First start

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

Create a first repository

  • 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 user alex read-write privileges to repository test.
    Access-Paths

Checkout on host machine

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>

Commit

$ cd <checkout>/<reponame>
$ touch test.txt
$ svn add test.txt
$ svn commit -m "initial commit"

Web frontends

Check the functionality by opening

within your favorite webbrowser.

Configuration

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.

About

my variant of <elleflorio|sea-kg>/svn-docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published