Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build SVN Server using Docker & Migrate SVN repo as GIT Repo
:: SUBVERSION Image with frontend ::
3343 - HTTP CSVN Admin Sites
4434 - HTTPS CSVN Admin Sites (If SSL is enabled)
18080 - Apache Http SVN
To run SVN Server execute the command below:
docker run -d -p 3343:3343 -p 4434:4434 -p 18080:18080 \
-v /srv/svn-data:/opt/csvn/data --name svn-server mamohr/subversion-edge
Check the url (Admin):
http://192.168.1.107:3343/csvn/login/auth
admin / admin
SVN Repo Url: http://192.168.1.107:18080/svn/<repo_name>
#---------------------------#
To Migrate SVN repo as GIT Repo:
Write bash script around this concept-
:: git svn clone http://svn-url:18080/svn/<repo_name> <repo_name>
::Get the listing and store in repolist.txt-
wget http://user:password@svn-url/svn/ -O - | grep \<li\>
::Use it in bash like-
for repo in $(cat repolist.txt);
do echo $repo;
git svn clone http://svn-url:18080/svn/$repo $repo
done
#-------------------------#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment