k8s-workflow-image/Dockerfile
Christoph Ellrich 4c91cce887
Some checks failed
Build and push k8s-workflow-image / build (push) Failing after 5s
add nodejs to Dockerfile
2025-04-09 22:23:09 +02:00

28 lines
868 B
Docker

FROM alpine
ARG HELM_VERSION=3.2.1
ARG KUBECTL_VERSION=1.17.5
# 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 Node.js
RUN apt-get update && apt-get install -y nodejs npm
WORKDIR /apps