refactor(ko): switch to buster base image

This commit is contained in:
Peter 2023-01-17 19:44:05 +01:00
parent ab18ed6c46
commit 9ddb1b4f77
No known key found for this signature in database

View file

@ -1,4 +1,12 @@
FROM docker.io/golang:1.19-alpine FROM docker.io/golang:1.19-bullseye as downloader
RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing/ >> /etc/apk/repositories && \ RUN apt-get update && \
apk add -U --no-cache ko apt-get install -y \
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
FROM docker.io/golang:1.19-bullseye as final
COPY --from=downloader /tmp/ko /usr/local/bin/ko