ci-images/ko/Dockerfile

10 lines
501 B
Text
Raw Normal View History

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 && \
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-08-23 21:59:56 +00:00
FROM docker.io/golang:1.21-bullseye as final
COPY --from=downloader /tmp/ko /usr/local/bin/ko