diff options
author | Jakob Borg <jakob@kastelo.net> | 2022-10-02 08:50:27 +0200 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2022-10-02 08:58:22 +0200 |
commit | 7e848a150ba56c261144eb46a9030d6e3b20a97b (patch) | |
tree | a7ead212ded42f5ea92bbc827bb3228589c4bcc2 | |
parent | 81bdde79eaead03683d51c47695b8923b7f5c8b0 (diff) |
docker: Fix handling of PCAP variable (fixes #8567) (#8568)v1.22.0
This correctly handles the absense of the PCAP environment variable,
which was broken in the previous change.
-rw-r--r-- | Dockerfile | 2 | ||||
-rwxr-xr-x | script/docker-entrypoint.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index 7c4913be67..d201c0811c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apk add --no-cache ca-certificates su-exec tzdata libcap COPY --from=builder /src/syncthing /bin/syncthing COPY --from=builder /src/script/docker-entrypoint.sh /bin/entrypoint.sh -ENV PUID=1000 PGID=1000 HOME=/var/syncthing PCAP= +ENV PUID=1000 PGID=1000 HOME=/var/syncthing HEALTHCHECK --interval=1m --timeout=10s \ CMD nc -z 127.0.0.1 8384 || exit 1 diff --git a/script/docker-entrypoint.sh b/script/docker-entrypoint.sh index f56817d1b5..e93e56306b 100755 --- a/script/docker-entrypoint.sh +++ b/script/docker-entrypoint.sh @@ -4,7 +4,7 @@ set -eu if [ "$(id -u)" = '0' ]; then binary="$1" - if [ "$PCAP" == "" ] ; then + if [ "${PCAP:-}" == "" ] ; then # If Syncthing should have no extra capabilities, make sure to remove them # from the binary. This will fail with an error if there are no # capabilities to remove, hence the || true etc. |