mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-12-22 03:47:06 +00:00
Use explicit UID/GID and show them in error message
This commit is contained in:
@@ -10,7 +10,7 @@ VOLUME /data
|
||||
WORKDIR /data
|
||||
|
||||
# running as a named unprivileged user
|
||||
RUN addgroup -S user && adduser -S user -G user
|
||||
RUN addgroup -S -g 1001 user && adduser -S -u 1001 user -G user
|
||||
RUN chown user:user /data
|
||||
USER user
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ then
|
||||
# Check if /data is writable
|
||||
if [ ! -w /data ]
|
||||
then
|
||||
echo "Data directory (mounted) at '/data' is not writable for container user 'user:user', ZIM file can not be written."
|
||||
echo "'/data' directory is not writable by '$(id -n -u):$(id -n -g)' ($(id -u):$(id -g)). ZIM file(s) can not be written."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user