-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (43 loc) · 1.68 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (43 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM node:22-bookworm
ARG TARGETARCH=amd64
ENV HELM_VERSION=v3.10.0
ENV KUBERNETES_VERSION=v1.25.3
ENV PNPM_VERSION=v8.12.1
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
gnupg \
htop \
jq \
openssh-client \
postgresql-client \
python3 \
sudo \
vim \
wget \
zstd && \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
echo "deb [arch=${TARGETARCH}] https://download.docker.com/linux/debian bookworm stable" | tee /etc/apt/sources.list.d/docker.list && \
apt-get update && \
apt-get install --no-install-recommends -y docker-ce && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/*
RUN if [[ "${TARGETARCH}" == "amd64" ]]; then \
curl -fsSL "https://github.com/pnpm/pnpm/releases/download/${PNPM_VERSION}/pnpm-linuxstatic-x64" -o /bin/pnpm; \
else \
curl -fsSL "https://github.com/pnpm/pnpm/releases/download/${PNPM_VERSION}/pnpm-linuxstatic-arm64" -o /bin/pnpm; \
fi && \
chmod +x /bin/pnpm
RUN usermod -aG docker node
RUN curl -fsSL -o helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -zxvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/helm && \
rm -rf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz linux-${TARGETARCH} && \
curl -sSL -o /usr/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/${TARGETARCH}/kubectl" && \
chmod +x /usr/bin/kubectl
USER node
WORKDIR /app
CMD ["pnpm", "start"]