Add linuxserver-style PUID and PGID support to the PhotoStructure docker image

I’m adding this feature request to gauge interest in improving user: support for docker users: https://photostructure.com/server/photostructure-for-docker/#library-ownership. This approach uses the --user option alongside userns-remap, which is kind of a PITA.

PhotoStructure doesn’t have any user-specific code in the Dockerfile or image to support users, but Linuxserver docker images typically include this init file which makes the process run as any arbitrary uid and gid.

Please vote for this if you’d rather have PUID/PGID support, instead of using docker’s --user feature.

1 Like

userns is an advanced feature, which cannot be enabled for just a single container and on some systems (e.g. Synology) changing the docker configuration is not exactly supported. Therefore, I’d prefer not needing to set this up.

I’ve just added this to the next build :tada:

Note that if you’ve been running PhotoStructure as root and then you upgrade, file permissions are likely such that the new custom userid/groupid won’t be able to read and write to the settings and .photostructure library contents. So, before you upgrade:

  1. Shut down PhotoStructure
  2. chown -R $UID:$GID the /ps/config, /ps/library, /ps/logs, and /ps/tmp bind mount source directories
  3. Edit your docker-compose.yml to pull from the new :beta tag
  4. docker-compose pull && docker-compose up --detach
2 Likes