From d29cc2ae688ec128c8f6fd8abb06c4c58ce2ffe7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Sat, 26 Oct 2024 00:04:16 +0200 Subject: [PATCH] Cleanup dockerfile (#996) Without this, docker buildx will complain about the following issues: - "RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior" - "FromAsCasing: 'as' and 'FROM' keywords' casing do not match" This fixes it. Signed-off-by: Jean-Philippe Evrard --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a17926b..1444e9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETPLATFORM alpine:3.20.3 as bin +FROM alpine:3.20.3 AS bin ARG TARGETOS ARG TARGETARCH @@ -19,7 +19,7 @@ RUN set -ex \ esac \ && cp /dist/kured_${TARGETOS}_${TARGETARCH}${SUFFIX}/kured /dist/kured; -FROM --platform=$TARGETPLATFORM alpine:3.20.3 +FROM alpine:3.20.3 RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata COPY --from=bin /dist/kured /usr/bin/kured ENTRYPOINT ["/usr/bin/kured"]