mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
Merge pull request #6533 from apparle/podman-compatibility
watchtower: change to a well-maintained repo and add podman compatibility
This commit is contained in:
commit
676fa6ccbf
2 changed files with 9 additions and 8 deletions
|
|
@ -1,11 +1,5 @@
|
|||
# syntax=docker/dockerfile:latest
|
||||
FROM golang:1.24.4-alpine3.21 AS go
|
||||
|
||||
RUN set -ex; \
|
||||
apk upgrade --no-cache -a; \
|
||||
apk add --no-cache \
|
||||
build-base; \
|
||||
go install github.com/containrrr/watchtower@76f9cea516593fabb8ca91ff13de55caa6aa0a8b;
|
||||
FROM ghcr.io/nicholas-fedor/watchtower:1.11.3 AS watchtower
|
||||
|
||||
FROM alpine:3.21.3
|
||||
|
||||
|
|
@ -13,7 +7,7 @@ RUN set -ex; \
|
|||
apk upgrade --no-cache -a; \
|
||||
apk add --no-cache bash ca-certificates tzdata
|
||||
|
||||
COPY --from=go /go/bin/watchtower /watchtower
|
||||
COPY --from=watchtower /watchtower /watchtower
|
||||
|
||||
COPY --chmod=775 start.sh /start.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,13 @@ elif ! test -r /var/run/docker.sock; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f /run/.containerenv ]; then
|
||||
# If running under podman disable memory_swappiness setting in watchtower.
|
||||
# It is a necessary workaround until https://github.com/containers/podman/issues/23824 gets fixed.
|
||||
echo "Running under Podman. Setting WATCHTOWER_DISABLE_MEMORY_SWAPPINESS to 1."
|
||||
export WATCHTOWER_DISABLE_MEMORY_SWAPPINESS=1
|
||||
fi
|
||||
|
||||
if [ -n "$CONTAINER_TO_UPDATE" ]; then
|
||||
exec /watchtower --cleanup --debug --run-once "$CONTAINER_TO_UPDATE"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue