gha-deploy-to-k3s/Dockerfile

26 lines
1.2 KiB
Docker

# Container image that runs your code
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 && \
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 --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
COPY entrypoint.sh /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]