Provides SVN service via HTTP. Built off Alpine Linux.
296
Docker image providing SVN services over HTTP using an Alpine Linux base.
/home/svn. The remaining instructions assume you named the container svn-server, but you can call it whatever you want.This file contains permissions for all your repositories. You can grant a user access to all repositories like this:
[/]
username = rw
You can grant a user access to a specific repository like this:
[reponame:/]
username = rw
You can grant a user access to only a path inside a repository like this:
[reponame:/trunk/subpath]
username = rw
You can grant read-only access by using r instead of rw.
This is a standard Apache htpasswd file. Manage this file with the htpasswd command.
If you do not have a passwords file already, use the following command to create the file and add your first user:
docker exec -it svn-server htpasswd -c /home/svn/users/passwords username
If you already have a passwords file and would like to add a user or change a user's password, use the following command:
docker exec -it svn-server htpasswd /home/svn/users/passwords username
Your repositories will live under this path. Inside this directory there will be one directory per repository.
To create a new repository, run the following command, replacing repository_name with the name you would like to use.
docker exec -t svn-server svnadmin create /home/svn/repos/repository_name
The SVN service runs as the user apache. The files it needs to use need to have the appropriate permissions for that user. We can ensure that with the following commands:
docker exec -t svn-server chown -R apache /home/svn
docker exec -t svn-server chmod u+rw /home/svn
If you create a new repository after the initial setup, you will need to make sure the new repository also has these permissions. You can use the following commands to update just the new repository:
docker exec -t svn-server chown -R apache /home/svn/repos/repository_name
docker exec -t svn-server chmod u+rw /home/svn/repos/repository_name
You should be ready to run! Start the Docker image.
Adjust the following URL with the hostname of your server and the appropriate port, then try it out in a web browser:
http://servername:3080/svn
You should now see a listing of all the repositories on your server.
To check out a repository, use a URL similar to the one below in your SVN client of choice:
http://servername:3080/svn/repository_name
Content type
Image
Digest
sha256:ce7ed2350…
Size
7.3 MB
Last updated
over 2 years ago
docker pull edigeronimo/svn