fix Dockerfile, tested locally

This commit is contained in:
Chris Oloff 2025-01-01 16:30:17 +02:00
parent c9073c61d2
commit edcc936564

View File

@ -2,15 +2,19 @@
FROM debian:12.8-slim
# compare https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
# https://stackoverflow.com/a/69684246
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install --no-install-recommends -y git nodejs gpg npm dnsutils \
apt-transport-https ca-certificates curl gnupg # packages in this line required for kubectl && \
apt-transport-https ca-certificates curl gnupg && \
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.32/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.32/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list && \
chmod 644 /etc/apt/sources.list.d/kubernetes.list && \
apt-get update && apt-get install -y kubectl && \
apt-get update && apt-get install -y --no-install-recommends kubectl && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Copies your code file from your action repository to the filesystem path `/` of the container