Giter VIP home page Giter VIP logo

svn-docker's Introduction

Docker Image

Description

Lightweight container providing an SVN server, based on linuxserver.io Alpine Linux and S6 process management (see here for details). The access to the server is possible via WebDav protocol (http://), and via custom protocol (svn://).

This is based on Elle Florio's excellent svn-docker, but has been updated from Alpine Linux 3.2 to 3.15 (the last build that supports PHP7, needed for SVNAdmin support). It has also been adapted to use the linuxserver.io Alpine Linux base image, which has PUID/PGID support for controlling what user Apache will run as, and use to access the repositories that are mounted in the container.

Elle Florio provided a tutorial on how to build this image, and how to run the container on Medium

Running Commands

To run the image, you can use the following command:

docker run -d --name svn-server -p 80:80 -p 3690:3690 -v <hostpath>:/home/svn -v svn_config:/etc/subversion -v svnadmin_config:/opt/svnadmin/data elleflorio/svn-server

/home/svn stores your repositories and can use either bind mount or named volume. /etc/subversion stores subversion configuration and /opt/svnadmin/data stores SVNADMIN configuration and both MUST use named volume.

Configuration

Apache will run with the user and group ID provided via the PUID and PGID environment variables, like all linuxserver.io based containers.

Subversion repositories are expected to be mounted at /home/svn, and need to be read/write accessible to the Apache user.

Access control is via the passwd (htpasswd format) and subversion-access-control files in /etc/subversion. There are default empty version of these provided in the image but you should ideally replace this configuration directory. These are read from and written to as root so file permissions aren't overly important.

You need to setup username and password for the access via WebDav protocol. You can use the following command from your host machine:

docker exec -t svn-server htpasswd -b /etc/subversion/passwd <username> <password>

To verify that everything is up and running, open your browser and connect to http://localhost/svn. The system should ask you for the username and password, then it will show you an empty folder (no repos yet if using the stock image, or your repos if you are mounting them). Check also that the custom protocol is working fine: go to your terminal and type svn info svn://localhost:3690. The system should connect to the server and tell you that is not able to find any repository. For further information on how to configure Subversion, please refer to the official web page.

Alternative configuration via SVNADMIN

the image provides a graphical ui using the SVNADMIN interface via http://localhost/svnadmin. You'll be prompted with a setup page, remember to test every step on the page then save the configuration.

How to contribute

If you find something that can be improved or the solution to some issue, just comment the issue to notify that you will handle it, and then submit a pull request. I will then merge it and publish the updated image in the Docker Hub.

svn-docker's People

Contributors

elleflorio avatar chhamilton avatar ivozzo avatar alevinetx avatar bvanreeven avatar crayon2000 avatar woobone avatar layanto avatar aleks-mariusz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.