Files
FabledScribe/infra/Dockerfile.runner-base
T
Bryan Van Deusen ca151c1a98 CI: split runner-base RUN steps to avoid nginx upload timeout
Single combined layer was ~280MB and consistently failed to push with
499 (nginx closing connection). Split into three layers (~70-100MB each)
so each is pushed independently and stays within the timeout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-10 13:24:26 -04:00

40 lines
1.8 KiB
Docker

# Runner base image for Forgejo act_runner job containers.
# Pre-installs Python 3.12 and Node 20 so the test job skips the
# ~3-4 minute deadsnakes PPA install on every run.
#
# Build and push (one-time setup, re-run if this file changes):
# docker build -f infra/Dockerfile.runner-base \
# -t git.fabledsword.com/bvandeusen/runner-base:py3.12-node22 .
# docker push git.fabledsword.com/bvandeusen/runner-base:py3.12-node22
#
# Then redeploy the act_runner stack in Portainer to pick up the new label.
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
# Split into separate RUN steps so each pushed layer is smaller.
# One combined layer would be ~280MB and exceeds the nginx upload timeout.
# Python 3.12 ships in Ubuntu 24.04 main repos — no PPA needed.
RUN apt-get update -qq && \
apt-get install -y -qq \
python3.12 python3.12-dev python3.12-venv python3-pip \
git curl ca-certificates gnupg && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Node 22 LTS via NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y -qq nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Docker CLI — daemon comes from the host socket mount, only CLI needed.
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
chmod a+r /etc/apt/keyrings/docker.asc && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list && \
apt-get update -qq && \
apt-get install -y -qq docker-ce-cli && \
apt-get clean && rm -rf /var/lib/apt/lists/*