TrueOsiris / docker-vrising

Container for V-Rising dedicated server
244 stars 63 forks source link

Server restart after docker container stop #24

Closed Buggy1987 closed 1 year ago

Buggy1987 commented 2 years ago

Hello, thank you for your great docker container but i have an error.

After playing and stopping the server with the "docker container stop ID" command i cant start the server again with the CLI command.

Errorcode: docker: Error response from daemon: Conflict. The container name "/vrising" is already in use by container "XXXXXXXXXIDXXXXNUMBERXXXXXXXXXXXXXX". You have to remove (or rename) that container to be able to reuse that name.

How can i restart the container?

Thank 4 help

TrueOsiris commented 2 years ago

I would use portainer or some other docker service (I'm using the unraid gui) to manage your containers. your question is related to docker in general. do docker ps -a and look at the container status. Also, a container name with a fw slash?

Buggy1987 commented 2 years ago

For now i have started the server once with your given cli command. But how can i stop the server in the right way? I mean does the server creates a save if i send the command "docker container stop id"?

TrueOsiris commented 2 years ago

No, it does an interrupt of the process. But the server should autosave when the last player logs out, and do periodic saves when people are playing.

ekremparlak commented 2 years ago

@Buggy1987 If you start the container with the cli command in the readme and stop the container with "docker container stop ", you can start the container with "docker start ID" Example; First start

docker run -d --name='vrising' \
--net='bridge' \
--restart=unless-stopped \
-e TZ="Europe/Paris" \
-e SERVERNAME="trueosiris-V" \
-v '/path/on/host/server':'/mnt/vrising/server':'rw' \
-v '/path/on/host/persistentdata':'/mnt/vrising/persistentdata':'rw' \
-p 9876:9876/udp \
-p 9877:9877/udp \
'trueosiris/vrising'

Stop

docker stop vrising

Start

docker start vrising

You can also use docker restart vrising for restart the container