watchtower: install from github repo to fix some security issues

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-03-26 18:27:44 +01:00
parent d3ac48f352
commit ca151e86ac

View file

@ -1,14 +1,18 @@
# syntax=docker/dockerfile:latest # syntax=docker/dockerfile:latest
# From https://github.com/containrrr/watchtower/blob/main/dockerfiles/Dockerfile.self-contained FROM golang:1.24.1-alpine3.21 AS go
FROM containrrr/watchtower:1.7.1 AS watchtower
RUN set -ex; \
apk add --no-cache \
build-base; \
go install github.com/containrrr/watchtower@76f9cea516593fabb8ca91ff13de55caa6aa0a8b;
FROM alpine:3.21.3 FROM alpine:3.21.3
RUN set -ex; \ RUN set -ex; \
apk upgrade --no-cache -a; \ apk upgrade --no-cache -a; \
apk add --no-cache bash apk add --no-cache bash ca-certificates tzdata
COPY --from=watchtower /watchtower /watchtower COPY --from=go /go/bin/watchtower /usr/local/bin/watchtower
COPY --chmod=775 start.sh /start.sh COPY --chmod=775 start.sh /start.sh