mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-05 06:42:12 +03:00
Integrated into release/v3.8.6
This commit is contained in:
@@ -89,6 +89,10 @@ RUN chown -R node:node /app
|
||||
|
||||
EXPOSE 20128
|
||||
|
||||
# Warns if the mounted data volume has wrong ownership
|
||||
COPY --chmod=755 scripts/check-permissions.sh /tmp/check-permissions.sh
|
||||
ENTRYPOINT ["/tmp/check-permissions.sh"]
|
||||
|
||||
USER node
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
|
||||
12
scripts/check-permissions.sh
Executable file
12
scripts/check-permissions.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -d "/app/data" ] && [ ! -w "/app/data" ]; then
|
||||
echo "WARNING: /app/data is not writable by the current user (UID $(id -u))."
|
||||
echo "Run this on the Docker host to fix:"
|
||||
echo " sudo chown -R 1000:1000 ./data"
|
||||
echo " chmod -R u+rwX ./data"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user