Hacker News new | ask | show | jobs
by datastack 1558 days ago
That sounds like an issue. This initial version is made on Windows, and although the commands are all unix-compatible, the unix file-permissions have slipped past, as on Windows docker runs as the current user.

Would this be easy to fix? Like, determining the current user id, and setting it when launching the command? Or would the host uid need to be mapped to the docker uid, which might be different for each image?

1 comments

You can pass in the current user’s uid/gid as an environment variable check out linuxserver images for an example https://hub.docker.com/r/linuxserver/unifi-controller
It is usually better to use --user $(id -u):$(id -g) to do this. You don't really need to pass it as a variable for the most part.
The author needs to add this and then try if everything works as expected (like npm and pip and so on)