feat: make ci-base equivalent to ubuntu-latest
Comprehensive runner image with Python, Node.js 20, Ruby, Go 1.22, Docker CLI, kubectl, Helm, yq, gh, make, jq, rsync, zstd, and all standard tools. Mirrors GitHub ubuntu-24.04 hosted runner so workflows are swappable between Gitea and GitHub with no friction.
This commit is contained in:
@@ -25,15 +25,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
make \
|
make \
|
||||||
build-essential \
|
build-essential \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
|
software-properties-common \
|
||||||
|
zstd \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Node.js 20 LTS — required for all Forgejo JS actions (checkout, upload-artifact, cache, etc.)
|
# Node.js 20 LTS — required to execute Forgejo JS actions (checkout, upload-artifact, cache, etc.)
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& npm install -g yarn \
|
&& npm install -g yarn \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Python 3.12
|
# Python 3 + pip + venv
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
@@ -42,7 +44,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
&& ln -sf /usr/bin/python3 /usr/local/bin/python \
|
&& ln -sf /usr/bin/python3 /usr/local/bin/python \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Ruby
|
# Ruby + Bundler
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ruby \
|
ruby \
|
||||||
ruby-dev \
|
ruby-dev \
|
||||||
@@ -53,9 +55,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
RUN curl -fsSL https://go.dev/dl/go1.22.10.linux-amd64.tar.gz | tar -C /usr/local -xz
|
RUN curl -fsSL https://go.dev/dl/go1.22.10.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||||
ENV PATH="/usr/local/go/bin:${PATH}"
|
ENV PATH="/usr/local/go/bin:${PATH}"
|
||||||
|
|
||||||
# Docker CLI (not daemon — socket is mounted from host)
|
# Docker CLI (socket mounted from host)
|
||||||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
|
||||||
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" \
|
||||||
> /etc/apt/sources.list.d/docker.list \
|
> /etc/apt/sources.list.d/docker.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends docker-ce-cli \
|
&& apt-get install -y --no-install-recommends docker-ce-cli \
|
||||||
@@ -73,7 +75,7 @@ RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm
|
|||||||
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
|
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 \
|
||||||
&& chmod +x /usr/local/bin/yq
|
&& chmod +x /usr/local/bin/yq
|
||||||
|
|
||||||
# GitHub CLI (gh) — for interacting with GitHub mirrors
|
# GitHub CLI
|
||||||
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
||||||
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
||||||
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
||||||
@@ -81,6 +83,3 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
|||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends gh \
|
&& apt-get install -y --no-install-recommends gh \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# zstd — required by actions/cache
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends zstd && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|||||||
Reference in New Issue
Block a user