Comments (8)
See PR #18 for the updates to acknowledge the PUID
and PGID
from valheim-docker.
Same. So what happens is the container needs to know what uid/gid to make the steam:steam user run as... Should pull those from environment variables during setup.
So for me I can't get through install even though I have 777 the directories on host system
If you look at https://hub.docker.com/u/linuxserver/ they have some good examples of how it should work.
Clues here: https://www.reddit.com/r/docker/comments/9iwe3t/where_can_i_find_out_how_puid_and_pgid_are_used/
from valheim-docker.
Looking at PR #18, I think you nailed it. I will pull the latest from docker hub and try that to confirm. Nice job on this, especially for a first time.
Looks good on my end. Thanks Michael
from valheim-docker.
Where are puid and guid variables coming from?
from valheim-docker.
@MattPark and @Fabiryn I need some help,
After doing some digging here are my findings and please correct me if I am wrong before I implement a fix. The user
field in the docker compose directs docker compose to run as a specific user inside the container. It should be unset or set to the application user but in most cases its set to root if the container itself handles switching to an application user. The usage of a PUID
and GUID
are to handle which id the application user is running as and in turn directs what permissions the files are created as on the host<->container volume mounts.
This is a security feature of docker limit what can and cant occur in terms of file reads + writes on the host. Does this sound about right?
from valheim-docker.
Your understanding is correct @mbround18 but to try and add more context:
Your base image has two users, root
and steam
. It's the steam user which owns the running steamcmd. The steam user normally gets the next incremental UID and a GID available from the perspective of the container's kernel. That UID and GID is preserved on volume mounts, and the "owner" of those files in the mount on the host will be whatever host user has that UID and GID (so it could be your personal account, or it could be a random service account).
Several container creators such as https://github.com/linuxserver/ respect a "PGID" and "PUID" environment variable which will set the UID and GID of that created user. It's still the same "user" within Docker, just mapped to a different PGID/PUID. See https://github.com/linuxserver/docker-baseimage-ubuntu/blob/b529d350b1438aa81e68a5d87eff39ade0f1c879/root/etc/cont-init.d/10-adduser#L6 for an example of how they do this.
from valheim-docker.
Thank you @vorpalhex and @MattPark, I was lost on this whole permissions thing. I think I have a fix for this but I am out of time to give it a whirl. Ill toss my branch up if one of ya'll do not mind giving it a spin locally?
from valheim-docker.
This issue is fixed, could someone please verify on :latest
version?
from valheim-docker.
Related Issues (20)
- Type + Mods Attributes with Syntax Errors HOT 1
- World Save on shutdown [Windows, Docker Desktop] HOT 23
- Not able to see BepInEx overlay in game when using TYPE=BepInEx HOT 2
- Can't start container due to lack of network. HOT 4
- How to debug container 'unhealthy'
- Daily saves clean up HOT 2
- Stop messages are not being sent to webhook HOT 5
- First start have failed HOT 3
- World save is not triggered on container stop HOT 10
- [BUG] "TZ" variable only changes the name of the timezone and not the time. HOT 9
- [ODIN] add preset/modifiers
- Cannot connect anymore since latest update (2023-Oct-11) HOT 7
- resource modifier help HOT 5
- cannot install bepinex using TYPE env variable HOT 5
- Requesting help,I created a container using the container,but it indicates that it is unhealthy and unable to connect. HOT 4
- On a fresh install, there is no longer a `/home/steam/valheim/unstripped_corlib`. This makes Odin think BepInEx is not installed and start the server without it. A workaround is to create it as an empty directory (`./valheim/server/unstripped_corlib`).
- Incompatible version error HOT 5
- Getting two Stop messages for server in Discord using webhook and auto restart scheduler HOT 1
- AppID Changed
- Execing into docker fails with odin commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valheim-docker.