Add option to modify the user
Currently, the PUID and GUID is set hardcoded to 1000:1000:
ENV DOCKER_ENABLE_SECURITY=false \
VERSION_TAG=$VERSION_TAG \
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -XX:MaxRAMPercentage=75" \
HOME=/home/stirlingpdfuser \
PUID=1000 \
PGID=1000 \
UMASK=022
Please add an option to make them editable. I'm not a Docker expert, but wouldn't this actually be enough?:
ENV DOCKER_ENABLE_SECURITY=false \
VERSION_TAG=$VERSION_TAG \
JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -XX:MaxRAMPercentage=75" \
HOME=/home/stirlingpdfuser \
PUID=${PUID:-1000} \
PGID=${GUID:-1000} \
UMASK=022
I believe user provided env variables already override these without code change
Can you confirm?
Okay so I can confirm this partially. When changing the PUID and GUID env variable like:
environment:
- PUID=3000
- GUID=3000
the server seems to start correctly and run flawlessly. It can also access the folders (with the folder's ownership set to 3000:3000). However, when I call whoami using:
docker exec -it stirling whoami
it says: root :/
Overriding the user like:
user: "3000:3000"
will result in the server throwing errors on startup.
Yeah right now due to volume mapping permission issues the app itself runs as user but docker runs as root
let me check on the user: 3000:3000 part