diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-10-07 04:12:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-07 02:12:07 +0000 |
commit | 9f8e6966d8aa67f04ec10490eb25698624a09fd0 (patch) | |
tree | fb4fa4e4f1b7312553d7aa8a2427888bd72b5e90 /script | |
parent | a64ae36bcc064275a0a00443e818e36a2f654cd4 (diff) | |
download | syncthing-9f8e6966d8aa67f04ec10490eb25698624a09fd0.tar.gz syncthing-9f8e6966d8aa67f04ec10490eb25698624a09fd0.zip |
docker: Allow start even if chown fails (fixes #9133) (#9152)
Diffstat (limited to 'script')
-rwxr-xr-x | script/docker-entrypoint.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/docker-entrypoint.sh b/script/docker-entrypoint.sh index e93e56306..af87ef80b 100755 --- a/script/docker-entrypoint.sh +++ b/script/docker-entrypoint.sh @@ -14,8 +14,10 @@ if [ "$(id -u)" = '0' ]; then setcap "$PCAP" "$binary" fi - chown "${PUID}:${PGID}" "${HOME}" \ - && exec su-exec "${PUID}:${PGID}" \ + # Chown may fail, which may cause us to be unable to start; but maybe + # it'll work anyway, so we let the error slide. + chown "${PUID}:${PGID}" "${HOME}" || true + exec su-exec "${PUID}:${PGID}" \ env HOME="$HOME" "$@" else exec "$@" |