Merge pull request #1824 from thelamer/dockerfile-update

#1821 update Dockerfile to alwyas use head Alpine
This commit is contained in:
Kubernetes Prow Robot 2024-02-12 12:12:28 -08:00 committed by GitHub
commit d872afb377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,17 @@
FROM alpine:3.9 as builder
# Alpine Builder
FROM alpine as builder
RUN apk add --no-cache curl
COPY ./build/VERSION VERSION
RUN version=$(cat VERSION) && curl -L "https://github.com/kubernetes/kompose/releases/download/v${version}/kompose-linux-amd64" -o kompose
RUN \
version=$(cat VERSION) && \
ARCH=$(uname -m | sed 's/armv7l/arm/g' | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') && \
curl -L \
"https://github.com/kubernetes/kompose/releases/download/v${version}/kompose-linux-${ARCH}" \
-o kompose && \
chmod +x kompose
FROM alpine:3.9
# Runtime
FROM alpine
COPY --from=builder /kompose /usr/bin/kompose
RUN chmod +x /usr/bin/kompose