blumeops/argocd/manifests/ci-base/Dockerfile
Erich Blume bcdee225e5
Some checks failed
Test CI / test (pull_request) Failing after 1s
Replace k8s runner with ci-base image for local builds
- Remove forgejo-runner k8s manifests and ArgoCD app (runner now on indri)
- Remove build-runner workflow (no longer needed)
- Add ci-base image with Ubuntu 22.04 + common CI tools
- Add build-ci-base workflow to build the image
- Update test workflow to check docker instead of buildah
- Document bootstrap vs production mode for runner labels
- Configure host.docker.internal:5050 for zot access from job containers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 09:23:24 -08:00

58 lines
1.7 KiB
Docker

# CI base image for Forgejo Actions
# Used by forgejo-runner for ubuntu-latest and ubuntu-22.04 labels
FROM ubuntu:22.04
# Prevent interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install common CI tools
RUN apt-get update && apt-get install -y --no-install-recommends \
# Essential tools
ca-certificates \
curl \
wget \
git \
jq \
unzip \
zip \
# Build tools
build-essential \
make \
# Python
python3 \
python3-pip \
python3-venv \
# Node.js (via nodesource for LTS)
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
# Docker CLI (not the daemon - we mount the socket)
&& 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 \
&& apt-get install -y docker-ce-cli \
# Clean up
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user for running jobs
RUN useradd -m -s /bin/bash runner \
&& mkdir -p /home/runner/work \
&& chown -R runner:runner /home/runner
# Set working directory
WORKDIR /home/runner/work
# Default to runner user
USER runner
# Verify installations
RUN echo "=== CI Base Image ===" \
&& git --version \
&& node --version \
&& npm --version \
&& python3 --version \
&& docker --version \
&& make --version | head -1 \
&& gcc --version | head -1