Skip to content

svn_test

Dockerfile
FROM centos

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

RUN yum -y update

RUN yum install -y subversion
RUN yum install -y make

RUN mkdir /data
WORKDIR /data

RUN svnadmin create svn
RUN svnadmin create .

COPY ./conf/svnserve.conf /data/svn/conf/svnserve.conf

EXPOSE 3690

CMD ["svnserve", "-d", "-r", "/data/svn"]
yml
version: '3'
services:
  svn:
    build: 
      context: .
      dockerfile: Dockerfile
    image: centos_svn
    restart: always
    volumes:
      - ./data/:/data/
      - ./conf/svnserve.conf:/data/svn/conf/svnserve.conf
    environment:
      TZ: Asia/Shanghai
    ports:
      - "3690:3690"

Released under the MIT License.