mirror of
https://github.com/kubereboot/kured.git
synced 2026-03-03 17:30:20 +00:00
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 <open-source@a.spamming.party>
26 lines
583 B
Docker
26 lines
583 B
Docker
FROM alpine:3.20.3 AS bin
|
|
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ARG TARGETVARIANT
|
|
|
|
COPY dist/ /dist
|
|
RUN set -ex \
|
|
&& case "${TARGETARCH}" in \
|
|
amd64) \
|
|
SUFFIX="_v1" \
|
|
;; \
|
|
arm) \
|
|
SUFFIX="_${TARGETVARIANT:1}" \
|
|
;; \
|
|
*) \
|
|
SUFFIX="" \
|
|
;; \
|
|
esac \
|
|
&& cp /dist/kured_${TARGETOS}_${TARGETARCH}${SUFFIX}/kured /dist/kured;
|
|
|
|
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"]
|