SVN not reacable

Hi,
I’m using Ubuntu 16 as a vm on a host Windows 10
I’m testing docker within svn and facing some issue as when i inspect the IP address I don’t find it
I built an image with this Dockerfile :
FROM centos
RUN yum install -y subversion
RUN yum install -y which
Add run_svn /opt
CMD /opt/run_svn

Then I run these commands:
mkdir SVN Work
docker run -it --rm -v $PWD/SVN:/opt/SVN svn /bin/bash
mkdir /opt/SVN/monitoring
svnadmin create /opt/SVN/monitoring
ls -l /opt/SVN/monitoring
vi /opt/SVN/monitoring/conf/svnserve.conf to add : anon-access = write in the [general] section
vi /opt/SVN/monitoring/conf/passwd to add root = rootpw
Exit from the container

Then : docker run -d --name svn -v $PWD/SVN:/opt/SVN -p 3690:3690 svn
docker ps
docker inspect svn
I’m surprised that there is no container running with the docker ps comand !
That is a first issue ! I was expected that even running in background we can see the process !
Then is there something missing as in the ouput of the inspect there is no value in the IP address param !
Thanks !

try the -d opuon for docker run, this will start your container in background otherwise it quits as you quit from the shell. Try to play with it a little.

That probably means the container exited. Does docker ps -a show it? In any case docker logs svn will probably tell you something about what’s going on; and if you’re having problems, running the same docker run command without the -d option will run it in the foreground and you can see the logs as things go.

The IP address from the docker inspect output is basically totally useless. With your docker run -p option, you should be able to access your service on port 3690 on the host (assuming the container is running some service listening on port 3690 internally).

Thank you all !
I’ll try !
Just one question about the first docker run command. There is the --rm option. I understood that exiting the container it will be cleaned and removed. That is true ! After this command I checked that the container isn’t here with either ps or ps -a docker command. So when I run a new container with -d option (the following command) based on the “svn” image the new container will not have the necessary stuffs as it’s a new container ? I mean for the first command it isn’t a good thing to use the -rm option. I can exit it and then stop it but not remove it. What do you think of that ?

What I tested…
To run with this command : docker run -it -v $PWD/SVN:/opt/SVN svn /bin/bash
Note that I juste get out the "–rm option"
Then check the process either running or not…: nothing was running and for the ps -a I got …
sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a69a224a687e svn “/bin/bash” 6 minutes ago Exited (0) 15 seconds ago inspiring_mcnulty
I don’t know how this name was generated ?!
So a container was given a name : inspiring_mcnulty
Then :
sudo docker logs inspiring_mcnulty showed effectively all commands I did when I run previously.
After that I can only restart this container but how to mount the volume afterwards ?..and how to connect a client ?