rfvgyhn / docker-avorion

Docker container for Avorion dedicated server
https://hub.docker.com/r/rfvgyhn/avorion
MIT License
26 stars 12 forks source link

[Bug] Container overwriting all the files on every restart. #19

Closed lightlike closed 2 years ago

lightlike commented 2 years ago

Every time the container restarts, it completely overwrites every file in the '/home/steam/.avorion/galaxies/avorion_galaxy' directory. I tested this with the server.ini, admin.xml and whitelist.txt.

I am using the default docker configuration given in the Repository. Nothing fancy as I am only thrying the server out to really use later except the --admin argument.

Permissions on the entire directory are user: 1000:1000 and mask: 770

Any idea why this is happening or how I can fix this.

rfvgyhn commented 2 years ago

When you say /home/steam/.avorion/galaxies/avorion_galaxy, are you referring to the dir inside the container or is that the path you have mounted on the host?

The only thing that comes to mind is to double check that you don't have a typo in your volume mounts.

lightlike commented 2 years ago

That is the directory inside the container. Everything is correctly generated on first run but every subsequent restart overrides all manual changes to every file inside the folder.

rfvgyhn commented 2 years ago

Are you modifying the files by making change inside the container directly or are you making changes on the host and mounting that with the -v option?

lightlike commented 2 years ago

I am making changes from outside the container. Specifically using smb/cifs. Both the data and backups are mounted via docker-compose volumes.

rfvgyhn commented 2 years ago

I'm at a loss then. It seems like it's a docker config issue, but I don't know.

Does it work properly if you try a temp container via the docker cli and a local bind mount?

  1. mkdir /host/tmp/path
  2. docker run --rm --name avorion -v /host/tmp/path:/home/steam/.avorion/galaxies/avorion_galaxy rfvgyhn/avorion
  3. Wait for server to start then ctrl+c
  4. Make some change in /host/tmp/path
  5. docker run --rm --name avorion -v /host/tmp/path:/home/steam/.avorion/galaxies/avorion_galaxy rfvgyhn/avorion
lightlike commented 2 years ago

That seems to work. Hmmmmmm. Maybe I did those changes while the Server was still running and it overrode them when shutting down. I will try some stuff out.