-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (33 loc) · 1.7 KB
/
Copy pathDockerfile
File metadata and controls
38 lines (33 loc) · 1.7 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
# 1. Inherit from official latest image (Includes Docker CLI, Git, Jq)
FROM ghcr.io/actions/actions-runner:latest
# 2. Switch to root to install dependencies
USER root
# 3. Install missing build tools
# build-essential: Includes make, gcc, g++
# python3: Required for some npm install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-minimal \
python3-pip \
python3-venv \
git-lfs \
wget \
curl \
ca-certificates \
&& git lfs install \
&& wget https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq \
&& curl -fsSL https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz | tar -xz \
&& mv linux-amd64/helm /usr/local/bin/helm && chmod +x /usr/local/bin/helm && rm -rf linux-amd64 \
&& curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.11.9/argocd-linux-amd64 && chmod +x /usr/local/bin/argocd \
&& curl -sSL -o /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x /usr/local/bin/mc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# 4. Install Docker Compose plugin (V2)
RUN mkdir -p /usr/local/lib/docker/cli-plugins \
&& curl -SL https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-linux-x86_64 \
-o /usr/local/lib/docker/cli-plugins/docker-compose \
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
# 5. Switch back to runner user (Mandatory)
USER runner
# 6. Pre-install helm-push plugin (avoid runtime download from GitHub CDN which is blocked in GKE)
RUN helm plugin install https://github.com/chartmuseum/helm-push --version v0.10.4