should work now
All checks were successful
Build and push k8s-workflow-image / build (push) Successful in 15s

This commit is contained in:
Chris Ellrich 2025-04-09 21:46:14 +02:00
parent c1c9650f47
commit 3ed4df61f8
Signed by: c.ellrich
GPG Key ID: D1850E1719D845AE

View File

@ -1,13 +1,24 @@
FROM alpine:3.19
FROM alpine
RUN apk add --no-cache curl bash ca-certificates
ARG HELM_VERSION=3.2.1
ARG KUBECTL_VERSION=1.17.5
# Install kubectl
RUN sh -c 'curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && rm kubectl'
# Determine architecture
RUN case `uname -m` in \
x86_64) ARCH=amd64 ;; \
armv7l) ARCH=arm ;; \
aarch64) ARCH=arm64 ;; \
ppc64le) ARCH=ppc64le ;; \
s390x) ARCH=s390x ;; \
*) echo "Unsupported arch" && exit 1 ;; \
esac && echo "ARCH=$ARCH" > /envfile
# Install Helm and kubectl
RUN . /envfile && \
apk add --no-cache curl ca-certificates bash && \
curl -sL https://get.helm.sh/helm-v${HELM_VERSION}-linux-${ARCH}.tar.gz | tar -xz && \
mv linux-${ARCH}/helm /usr/bin/helm && chmod +x /usr/bin/helm && rm -rf linux-${ARCH} && \
curl -sLO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \
mv kubectl /usr/bin/kubectl && chmod +x /usr/bin/kubectl
# Install Helm
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
ENTRYPOINT ["/bin/sh"]
WORKDIR /apps