Running SVN in Docker

Currently reading
Running SVN in Docker

303
55
NAS
DS923+ (16GB)
Router
  1. RT6600ax
Operating system
  1. Windows
I was experimenting a bit with SVN in Docker (since Synology killed SVN for DSM7 for some reason) but have more or less given up. The guides results in just more questions for a newbie as myself.
Is there a way of running a SVN Server (on DSM7, I should never have installed it!) in a simple way?
 
If you share what your researches indentiefied as image to use and share what you tried so far, we can try to untangle it.

Have you considered to skip svn and use git instead? For instance, the Gitea image is easy to setup and a featerhweight on the resources.
 
Yeah I'm using Git aswell but I discovered today that I missed my SVN server on my NAS. :)
I tried installing the "garethflowers-svn-server" but it gives me headache.
I run it and nothing happens in the log/terminal windows whatsoever..

I've configured volume settings (no idea if that's correct actually):
1657127183500.png


Port settings
1657127204501.png
 
Last edited:
Yeah this is a pain in the neck now. I found Docker the way to go, despite all its extra complications.

I followed the same guide @insertrealname references, but it's no longer available. Far from ideal, but I've attached a PDF of it so at least the content is available for posterity.

While this worked and is what I'm using today (hence my interest in making a record of the original article!), it's a bit hard to setup and maintain. Being able to create a new repo by just creating a new folder and waiting 10 minutes is handy - I retained that feature. But if I were to do it today I'd probably give the MarkusH1975 option (also referenced above) a go.

This is kinda a killer application for a NAS for me. If I wanted to use the latest mess on the Internet designed for web devs, I'd just use GitHub. But I have a NAS so I can administer my own time-hardened and unpopular servers like SVN.
 

Attachments

  • How do I launch an SVN server based on Docker on my Synology NAS_ - Synology Knowledge Center.pdf
    606.4 KB · Views: 456
Since this DS is my firsd Synology NAS I did not have volume/svn and procedure did not go through. I recalled my small experience with linux and used
Code:
cd /volume1/
mkdir svn
mkdir: cannot create directory ‘svn’: Permission denied - угу, понятно.
sudo mkdir svn
chmod 777 ./svn
cd svn/
It's quite obvious thing, but just in case if somebody goes the same way.

After that I was able to run.
Code:
git clone https://github.com/MarkusH1975/svnserver.apache.mh.git
cd svnserver.apache.mh/
sudo ./start.sh
It went ok.

Set reverse proxy but after that I got stuck
https://myserverip:8088/ do not provide any kind of response I could continue with.
Internal local address says: Sorry, the page you are looking for is not found.
If I use an external address that I set with synology.me This site can’t be reached
What did I miss?
 
Set reverse proxy
What did you use as a reverse proxy? The built in nginx (Login Portal) or something else?

If I use an external address that I set with synology.me This site can’t be reached
What did I miss?
Until the internal access is fixed, getting from the outside will also be problematic, but even if its working, to get to it from the outside you will have to port forward. Have you done that?
 
The built in.
So you are using internal RP, but how are you hosting this solution? docker or some other method?

Regardless how its hosted, how have you configured the reverse host?

I believe I have not. I tried, but I'm not sure I did it the right way.
Well if you want external access you will have to open it on your router. Correctly I might add.
 
@Rusty
I've got lost somewhere in the middle of DS NAS :)
I can't even find now where was my RP... So, I stopped this SVN and deleted its docker container.
In the other forum I got a link to an article where its author described his way of setting up the SVN.
The good thing - it was written in the beginning of 2023 and I decided to give it a try.
Downloaded the svn package into docker and ran it. Pictures in my system are different from the pictures in the article but after several starts and stops/deletes of this container I can go to the some point faster and faster :)
And the point where I'm stuck now is:
This will allow us to check the SVN repository via browser http://<your-nas-ip>:<your-port>/svn

I did not set any ports
PortSettings.png

Which ports numbers should I write to this table? And I believe, I should choose TCP, correct?
And in the browser what should be in the <your-nas-ip> ? My external IP address? Or I can use my string address from asuscom.com I believe.
Which port should be written in that address: Local port from this table or container port?
Should I change anything in my router?

Obviously the article author had already his SVN data he used with DSM 6.x and everything have been already set. I did not and need to go through this at least once.
 
@Rusty
I've got lost somewhere in the middle of DS NAS :)
I can't even find now where was my RP... So, I stopped this SVN and deleted its docker container.
In the other forum I got a link to an article where its author described his way of setting up the SVN.
The good thing - it was written in the beginning of 2023 and I decided to give it a try.
Downloaded the svn package into docker and ran it. Pictures in my system are different from the pictures in the article but after several starts and stops/deletes of this container I can go to the some point faster and faster :)
And the point where I'm stuck now is:

I did not set any ports
View attachment 14089
Which ports numbers should I write to this table? And I believe, I should choose TCP, correct?
And in the browser what should be in the <your-nas-ip> ? My external IP address? Or I can use my string address from asuscom.com I believe.
Which port should be written in that address: Local port from this table or container port?
Should I change anything in my router?

Obviously the article author had already his SVN data he used with DSM 6.x and everything have been already set. I did not and need to go through this at least once.
Checking the hub.docker.com page for the Docker image used we can see two ports being configured

-p 80:80 -p 3690:3690

This means that the container uses two ports, 80, and 3690. You can map it to any custom port on your end (by using the local port setting). So one example would be 1234:80 and 3567:3690, or any combination that you want. The important thing is to not change the right values, those need to be as in the documentation. Give it a go and then try and connect to your SVN instance using the port that you have set instead of port 80.
 
@Rusty
Ok, I put 8080:80 and 3690:3690
There is no luck. :-( Still if I go to my <MyNASaddress>/svn I get 404 error.
If I go through the Telnet (as it recommended at hub.docker.com) with request
Code:
svn info svn://192.168.10.206:3690
the response is
Code:
-sh: svn: command not found

The attached log shows a bunch of problems that I don't know how to interpret to plain English, at least :) Definitely I missed something but can't figure out what exactly I missed.
 

Attachments

  • SVN info.png
    SVN info.png
    23.5 KB · Views: 18
  • ChudSVNcsv.zip
    21.3 KB · Views: 7
From the image I see you are using "host" network and not bridge. Is this correct? How did you managed to enter the ports if you are on a host bind?
Well, by default the docker suggested to use bridge with some strange IP address 172.xxx.xxx.xxx that I could not change and it did not work anyway. So, I tried to use host, whatever it means - the result is the same.
I can reinstall it with bridge, but how to change the IP address for it?
 
I can reinstall it with bridge, but how to change the IP address for it?
Do not focus on those IPs. Those are internal container IPs. If you want to learn more about this maybe Docker KB will help you understand how networking works when it comes to Docker, but atm the short version is, don't worry about it.

Focus on the bridge network and make sure to map the ports correctly (or towards the ports you expect the platform to broadcast). The fact that it doesn't load you will need to troubleshoot it by looking inside the logs (if there will be anything in those to begin with).

So, if you are willing, try it again, ignore the IP address atm, and try and access the platform on your NAS local IP address on the port that you have mapped. The ip address 172.xx.x.x just ignore for the time.
 
@Rusty
Ok, will try.
BTW, I've noticed that both authors whos solution I was trying to repeat had originally SVN working on DSM6. May be it makes sense to downgrade to DSM6, set the SVN package, update again to DSM7 and run docker SVN? What do you think?
I still don't have any data on my fresh NAS, no data will be lost.
 
May be it makes sense to downgrade to DSM6, set the SVN package, update again to DSM7 and run docker SVN?
Official downgrade of DSM is not supported. Once you update there is no going back (officially and supported that is). On top of this, I see no reason for this not to work on 7 as it did on DSM 6. I could give this a spin today when I get out of meetings and see if I will be successful on DSM 7 and post back, but all in all, imho do not look in the direction of downgrade.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

How did you create the Portainer container in first place? As in exact docker run commands or in case...
Replies
7
Views
1,241
Thank you for this - I'll give it a go and see where I get - worst case I learn something as I go!
Replies
6
Views
1,493
  • Question
1707646023 Old post!! But I have the same isue. To enable the portal, I go into Container Management...
Replies
7
Views
9,885
ye, feels like routing issue. Internet connection is working until tunnel is up. After that tunnel seems...
Replies
26
Views
4,931
Have you tried to setup a rule for specific docker network subnet for that container and test internet access?
Replies
24
Views
9,180
@DeltaGolf Here’s my approach: Docker - NextCloud on Synology NAS using Docker compose (with Portainer)
Replies
18
Views
4,624

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top