2024-05-15 16:38:48 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
2024-10-17 03:35:21 +00:00
|
|
|
ARG BASE_IMAGE=node:23-bookworm-slim
|
2023-11-16 18:49:44 +01:00
|
|
|
|
|
|
|
FROM ${BASE_IMAGE}
|
|
|
|
|
2023-12-22 23:36:40 +01:00
|
|
|
ARG LLVM_VERSION=16
|
2024-11-28 13:54:03 +01:00
|
|
|
ARG TARGETARCH
|
2023-12-22 23:36:40 +01:00
|
|
|
|
2024-05-15 16:38:48 +02:00
|
|
|
# common tools
|
2023-11-16 18:49:44 +01:00
|
|
|
RUN --mount=type=cache,target=/var/lib/apt \
|
|
|
|
--mount=type=cache,target=/var/lib/cache \
|
2024-05-15 16:38:48 +02:00
|
|
|
--mount=type=cache,target=/var/cache/apt \
|
2023-11-16 18:49:44 +01:00
|
|
|
apt-get update && \
|
2023-12-22 10:24:56 +01:00
|
|
|
apt-get install -y \
|
2025-01-21 10:59:26 +01:00
|
|
|
lsb-release \
|
2024-11-28 13:10:35 +01:00
|
|
|
sudo \
|
|
|
|
git-lfs \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
jq \
|
|
|
|
gnupg \
|
|
|
|
gcc \
|
|
|
|
clang-${LLVM_VERSION} \
|
|
|
|
llvm-${LLVM_VERSION} \
|
|
|
|
libbpf-dev \
|
|
|
|
make \
|
|
|
|
unzip \
|
|
|
|
libgraphite2-3 \
|
|
|
|
zstd && \
|
2023-12-22 19:34:22 +01:00
|
|
|
ln -s /usr/lib/llvm-${LLVM_VERSION}/bin/clang /usr/bin/clang && \
|
2024-05-15 16:38:48 +02:00
|
|
|
ln -s -f /usr/lib/llvm-${LLVM_VERSION}/bin/llc /usr/bin/
|
|
|
|
|
|
|
|
ADD --chmod=444 https://cli.github.com/packages/githubcli-archive-keyring.gpg /etc/apt/keyrings/githubcli-archive-keyring.gpg
|
|
|
|
ADD --chmod=444 https://download.docker.com/linux/debian/gpg /etc/apt/keyrings/docker.asc
|
|
|
|
|
|
|
|
# Docker and other tools
|
|
|
|
RUN --mount=type=cache,target=/var/lib/apt \
|
|
|
|
--mount=type=cache,target=/var/lib/cache \
|
|
|
|
--mount=type=cache,target=/var/cache/apt \
|
|
|
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \
|
2023-11-16 18:49:44 +01:00
|
|
|
echo \
|
2024-11-28 13:10:35 +01:00
|
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list && \
|
2023-11-16 18:49:44 +01:00
|
|
|
apt-get update && \
|
2024-05-15 16:38:48 +02:00
|
|
|
apt-get install -y \
|
2024-11-28 13:10:35 +01:00
|
|
|
gh \
|
|
|
|
docker-ce docker-ce-cli containerd.io docker-buildx-plugin
|
|
|
|
|
|
|
|
# AWS CLI
|
|
|
|
RUN --mount=type=cache,target=/tmp \
|
2024-11-28 13:54:03 +01:00
|
|
|
if [ "${TARGETARCH}" = "amd64" ]; then \
|
|
|
|
curl -o "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"; \
|
|
|
|
elif [ "${TARGETARCH}" = "arm64" ]; then \
|
|
|
|
curl -o "/tmp/awscliv2.zip" "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip"; \
|
|
|
|
else \
|
|
|
|
echo "Unsupported architecture: ${TARGETARCH}"; \
|
|
|
|
exit 1; \
|
|
|
|
fi && \
|
|
|
|
unzip -o /tmp/awscliv2.zip -d /tmp && \
|
2024-11-28 13:10:35 +01:00
|
|
|
/tmp/aws/install
|
2025-01-20 18:11:28 +01:00
|
|
|
|
|
|
|
# ArgoCD CLI
|
|
|
|
RUN curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-arm64 && \
|
|
|
|
chmod +x /usr/local/bin/argocd && \
|
|
|
|
argocd version --client
|
|
|
|
|
|
|
|
# kustomize
|
|
|
|
RUN curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- /usr/local/bin
|