mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2026-04-28 03:30:03 +00:00
Use explicit UID/GID and show them in error message
This commit is contained in:
parent
0232f0a95f
commit
81d9a6cc02
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue