What is Subversion?
Subversion exists to be universally recognized and adopted as an open-source, centralized version control system characterized by its reliability as a safe haven for valuable data; the simplicity of its model and usage; and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations. -https://subversion.apache.org/
Installing Docker
- Log into the Linux based device
- Run the following commands in the terminal
# install prerequisites
sudo apt install apt-transport-https ca-certificates git curl software-properties-common gnupg-agent -y
# add docker gpg key
curl -fsSL https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release)/gpg | sudo apt-key add -
# add docker software repository
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F'=' '/^ID=/{ print $NF }' /etc/os-release) $(lsb_release -cs) stable"
# install docker
sudo apt install docker-ce docker-compose containerd.io -y
# enable and start docker service
sudo systemctl enable docker && sudo systemctl start docker
# add the current user to the docker group
sudo usermod -aG docker $USER
# reauthenticate for the new group membership to take effect
su - $USER
Running Subversion
- Now that Docker is installed, run the following commands to setup the Subversion Docker container and run it
# create repository directory
mkdir ~/docker/subversion/repos -p
# run subversion container
docker run -d --name=subversion -p 8080:80 -p 3690:3690 -v ~/docker/subversion/repos:/data/svn -e SVN_LOCAL_ADMIN_USER=admin -e SVN_LOCAL_ADMIN_PASS=SomethingSecure --restart=unless-stopped iaean/subversion
- Open a web browser and navigate to http://DNSorIP:8080
- Login with the credentials set with the SVN_LOCAL_ADMIN_USER and SVN_LOCAL_ADMIN_PASS environment variables
- Open a new browser tab and navigate to http://DNSorIP:8080/websvn
- Welcome to Subversion running in Docker
Create a New Repository
- With Subversion running, continue with the following commands to create a new code repository
# create a repository called demorepo
docker exec -it subversion /usr/bin/svnadmin create /data/svn/sandbox/demorepo
- Back in the browser refresh WebSVN to see the new repository
Source: https://github.com/iaean/docker-subversion