should work now
All checks were successful
Build and push k8s-workflow-image / build (push) Successful in 15s
All checks were successful
Build and push k8s-workflow-image / build (push) Successful in 15s
This commit is contained in:
parent
c1c9650f47
commit
3ed4df61f8
29
Dockerfile
29
Dockerfile
@ -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
|
# Determine architecture
|
||||||
RUN sh -c 'curl -LO "https://dl.k8s.io/release/$(curl -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
|
RUN case `uname -m` in \
|
||||||
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && rm kubectl'
|
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
|
WORKDIR /apps
|
||||||
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/sh"]
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user