Container (docker) create svn

To reduce the size of the mirror, the use of containers for the alpine + svn container, not only 20M, directly pulling:

Container (docker) create svn
Dockerfile as follows:
where xxx is the name of the picture image, actually said the word is prohibited excessive.


From xxx

WORKDIR /home/svn

RUN apk update && \
    apk add --no-cache subversion

CMD [ "/usr/bin/svnserve", "--daemon", "--foreground", "--root", "/home/svn" ]

Alpine mirror package before use, time zone has been modified. SVN address / home / svn; account password is not defined, the need to run their own modifications;

After you create a container, the container needs to access and create a warehouse under the path / home / svn, for example:
svnadmin the Create Repository , and configure the account password permissions;
you can use: svn: // IP: PORT / repository

Remarks:

After you create a container configuration svn:

#cd /home/svn
#svnadmin create repository
#vi repository/conf/svnserver.conf

anon-access = none   #匿名用户不可读
auth-access = write    #登陆用户可写
password-db = passwd  #启用passwd配置
authz-db = authz            #启用权限authz配置

#vi repository/conf/passwd

admin = adminpassword   #配置账户密码

#vi repository/conf/authz

admingroup = admin  #admin用户属于admingroup组
[repository:/]
@admingroup = rw
* = r
#仓库repository下admingroup组有rw权限,其他组有读权限

Remember to restart svn finished modifying the configuration container, if used k8s and configure a persistent store, remember to mount the disk permissions, or upload will fail -

Guess you like

Origin blog.51cto.com/bilibili/2438161