Skip to content

Commit

Permalink
Merge pull request kubernetes#1824 from thelamer/dockerfile-update
Browse files Browse the repository at this point in the history
kubernetes#1821 update Dockerfile to alwyas use head Alpine
  • Loading branch information
k8s-ci-robot authored and sosan committed Feb 14, 2024
2 parents 932c9b0 + 61680d1 commit a17b8a9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a17b8a9

Please sign in to comment.