运行容器

SHELL
docker run \
	--name my-svn-server \
	--detach \
	--volume /home/svn:/var/opt/svn \
	--publish 3690:3690 \
	garethflowers/svn-server

进入容器

SHELL
docker exec -it my-svn-server sh

创建仓库

SHELL
svnadmin create Repository

编辑配置文件

  1. 进入仓库配置文件目录 cd Repository/conf
  2. 编辑文件 svnserve.conf 解除以下注释
CONF
anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
  1. 将 anon-access = read 改为 anon-access = none
  2. 编辑 passwd 文件,添加用户名密码,如:
CONF
用户名 = 密码
chaim = 123456
  1. 编辑 authz 文件,设置用户权限,如:
CONF
[路径]
用户名 = 权限
[/]
chaim = rw

重启容器

SHELL
docker restart my-svn-server

: Cheyne Xie

: https://chaim.eu.org/posts/55ceaa67/

: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.