forked from kubernetes/kompose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#1824 from thelamer/dockerfile-update
kubernetes#1821 update Dockerfile to alwyas use head Alpine
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |