sethmachine / valheim-server-docker

Host Valheim Server using Docker.
18 stars 9 forks source link

Add user and example docker-compose #4

Closed TheCatster closed 3 years ago

TheCatster commented 3 years ago

Proposed solution to user permission problems on Linux.

Closes #3

sethmachine commented 3 years ago

Awesome, I appreciate the pull request for fixing this issue. There are a lot of similar repos on GitHub for running a Valheim server on Docker. What I hope separates this one is the focus is on being educational, so it's friendly to hobbyists. What I don't want to offer is just a "pull, run, and forget" attitude for this Docker image.

With that in mind, before your PR is merged, could you update the readme to include instructions on when, how and why to run the docker-compose.yml as opposed to just running a Docker image?

TheCatster commented 3 years ago

Absolutely! I personally use this container alongside a larger one anyways, but I just wanted to help out. I'll add those details.

TheCatster commented 3 years ago

You said you run this on a Mac using Docker Desktop, right? Maybe that's the disconnect. I've never used desktop docker.

sethmachine commented 3 years ago

Exactly, yes I've only tested this with Docker Desktop on macOS. That may be why Linux issues like permissions have been popping up.

And mind confirming that the new image works as expected and writing this in your PR description? I've done a manual test where I build a local image, run a brand new world and then stop it. I then check to see if the .db file is correctly generated. This can be automated in the future.

TheCatster commented 3 years ago

The image I had worked fine, I'd been running a server for friends using it. Adding the comments won't (I sure hope!) change that. And yeah, permissions are a fairly common issue that needs to be addressed, since otherwise the user on the GNU/Linux OS (think like your user) won't be able to access/edit the files within. Or, the container won't be able to write to the dir.

TheCatster commented 3 years ago

Do you want a comment in the docker compose as well, or just in the Dockerfile and README?

TheCatster commented 3 years ago

Added documentation, let me know what you think.