ci-images/kustomize/Dockerfile
Peter Kurfer b934502cb3
All checks were successful
continuous-integration/drone/push Build is passing
feat(kustomize): add image
2023-04-18 08:45:48 +02:00

12 lines
No EOL
831 B
Docker

FROM docker.io/alpine:latest as downloader
RUN apk add -U --no-cache curl jq && \
export KUSTOMIZE_VERSION=$(curl https://api.github.com/repos/kubernetes-sigs/kustomize/releases | jq -r '[.[] | select(.tag_name | startswith("kustomize/"))] | first |.tag_name | capture("(?<version>[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)") | .version') && \
curl -L "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" | tar xvz -C /tmp && \
curl -L -o /tmp/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x /tmp/kubectl
FROM docker.io/alpine:latest
COPY --from=downloader /tmp/kustomize /usr/local/bin/
COPY --from=downloader /tmp/kubectl /usr/local/bin/