2023-02-18 10:34:27 +00:00
|
|
|
FROM docker.io/alpine:latest as downloader
|
2023-01-03 20:24:12 +00:00
|
|
|
|
2023-02-18 10:34:27 +00:00
|
|
|
RUN apk add -U --no-cache curl jq && \
|
2023-01-17 18:44:05 +00:00
|
|
|
export KO_VERSION=$(curl https://api.github.com/repos/ko-build/ko/releases | jq -r '. | first |.tag_name | capture("(?<version>[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)") | .version') && \
|
|
|
|
curl -L "https://github.com/ko-build/ko/releases/download/v${KO_VERSION}/ko_${KO_VERSION}_Linux_x86_64.tar.gz" | tar xvz -C /tmp
|
|
|
|
|
2023-02-08 12:09:07 +00:00
|
|
|
FROM docker.io/golang:1.20-bullseye as final
|
2023-01-17 18:44:05 +00:00
|
|
|
|
|
|
|
COPY --from=downloader /tmp/ko /usr/local/bin/ko
|