Optimize CI runner image — replace catthehacker/ubuntu:act-latest #120
Labels
No Label
architect:complete
blocked-by:#139
blocks:#140
bug
CI/CD
complexity:low
complexity:medium
complexity:medium
config
depends-on:#124
docker
docs
effort:l
effort:s
effort:xs
epic/development
lead:complete
needs-decision
performance
priority:critical
priority:high
priority:low
priority:medium
security
spike
story-points:1
story-points:3
story-points:5
story-points:8
tech-debt
test
user-story
architect:complete
complexity:high
complexity:low
complexity:medium
cross-repo
cross-repo-dev
dev:in-progress
effort:l
effort:m
effort:s
effort:xl
effort:xs
epic
analytics
epic
development
epic
devops
epic
infra
epic
observability
epic
platform
epic
product
lead:complete
needs-decision
pipeline-complete
pipeline-error
pipeline-running
priority
later
priority
next
priority
now
start-pipeline
status
acceptance
status
blocked
status
done
status
in progress
status
in review
status
in testing
status
ready
status
refine
status
triage
subtask
type
analysis
type
bug
type
hygiene
type
mantainence
type
story
user-story
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Hithomelabs/CFTunnels#120
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Overview
Two CFTunnels CI workflows (
test_image_build_push.ymlandprod_image_tag_promote.yaml) currently use thecatthehacker/ubuntu:act-latestDocker image (~1.57 GB) as their container runtime. This investigation evaluates options to reduce disk usage, pull times, and build cache bloat.🔍 Server Probe Findings (media: 192.168.0.100)
gitea_pr_runner(gitea/act_runner:latest)/config/config.yaml= 0 bytes (env-var only)Runner label mapping (from env vars):
⚙️ Why the Large Image Exists
The workflows use
catthehacker/ubuntu:act-latestbecause the Gradle + PaketobootBuildImagestep needs:docker tag/docker pushof the built image to the registrybootBuildImagetaskThe image is pulled on every job run, sits on disk, but no running container references it — it is purely a CI build-time dependency.
📊 Options Analysis
Option A: Custom Slim Image (~230 MB) ✅ RECOMMENDED
Create a minimal Alpine-based Dockerfile combining only the essentials.
Size breakdown:
eclipse-temurin:17-jdk-alpinedocker-cli+git+ utilsSavings: ~1.34 GB per pull per disk
Pros:
192.168.0.100:8928/hithomelabs/ci-runner:latest) for fast LAN pullsCons:
Changes needed in workflow YAML:
Option B: Split Build + Dockerize (Two Jobs)
Separate the Gradle build from the containerization step:
buildjob — usesnode:16-bullseye(runner default), runs./gradlew build, produces JAR artifactdockerizejob — usesdocker:cliimage (or custom), receives JAR, runsbootBuildImage+ pushPros:
node:16-bullseyefor builddocker:cliis ~125 MB (but still needs JDK for PaketobootBuildImage)Cons:
bootBuildImagestill needs JDK — you can't just usedocker:clialonebootBuildImage(Paketo runs the Gradle plugin which compiles)Option C: Host Docker Directly (No Container Image)
Remove the
container:directive entirely — steps run directly on the host runner.Pros:
Cons:
🏆 Recommendation: Option A (Custom Slim Image)
Adopt Option A for the following reasons:
192.168.0.100:8928/hithomelabs/ci-runner:latestrenovate-style automationsDockerfile (Draft)
Build & Push Command
Workflow Changes
In both
test_image_build_push.ymlandprod_image_tag_promote.yaml:🔄 Secondary Concern: Runner Labels — Upgrade from node:16
The runner label mapping currently uses
node:16-bullseye(940 MB, EOL April 2023 — no longer receiving security patches). This is used by all other workflows (not just the two CFTunnels ones).Recommended change:
This requires updating the runner's environment variables (or config file if populated) and restarting the
gitea_pr_runnercontainer.🧹 Parallel Concern: Build Cache Pruning
13 GB of stale Paketo buildpack cache found on disk, 20 months old, never pruned.
Recommended action:
This is independent of the image change but highly recommended to reclaim disk space.
📈 Expected Impact
node:16)📝 Implementation Checklist
ci-runner/Dockerfilewith the draft above192.168.0.100:8928/hithomelabs/ci-runner:latest)test_image_build_push.ymlcontainer image referenceprod_image_tag_promote.yamlcontainer image referencedocker buildx prune --all --forceon media server/etc/cron.weekly/docker-prune)node:16-bullseye→node:20-bookwormgitea_pr_runnercontainer with new label mapping/label ~"CI/CD" ~"performance" ~"security"
🧪 Test Plan: Validating the Custom CI Runner Image Before Promotion
Per the user's request, here is the test plan to validate the custom slim image without touching CFTunnels workflows until we're confident.
Strategy: Isolate → Validate → Promote
We've created an epic in
Hithomelabs/HomeLabDocker(#58) with 6 user stories that implement this plan:eclipse-temurin:17-jdk-alpine+ docker-cli + git) to192.168.0.100:8928/hithomelabs/ci-runner:1.0.0hitanshu/ci-runner-testwith a minimal Gradle/Spring Boot project + Gitea Actions workflowworkflow_dispatch), validate JDK 17, Docker CLI, Git,bootBuildImage, anddocker pushall worktest_image_build_push.ymlandprod_image_tag_promote.yamlvia PR with pinned version tagnode:16-bullseye→node:20-bookwormKey Design Decisions
hitanshu/ci-runner-test), not org — no risk of affecting production workflowsworkflow_dispatchonly — never triggers on push:1.0.0not:latest) in CFTunnels for deterministic buildsRollback Plan
If prod CI breaks after promotion:
container:imagecatthehacker/ubuntu:act-latestis still on diskFull Plan
See the detailed epic: Hithomelabs/HomeLabDocker#58 → Hithomelabs/HomeLabDocker#58
══════════════════════════════════════════════════════════
PM AGENT COMPLETED ✓
══════════════════════════════════════════════════════════
Milestone: CI Runner Optimization — Custom Slim Image & Test Validation — #3
Epic: Hithomelabs/HomeLabDocker#65
Created 6 user stories under Polly in
Hithomelabs/HomeLabDocker:Total Story Points: 20
Priority Distribution: critical[0] high[3] medium[2] low[1]
Critical Path:
#66 (Build & Push) → #67 (Create Test Repo) → #68 (Validate) → #69 (Promote)
Independent (can run in parallel):
#70 (Runner Labels) and #71 (Prune Cache) are independent of the critical path
ADR / Architect Analysis: Documented in this issue (CFTunnels#120) by hitanshu ✅
Closing this issue — all implementation work tracked in HomeLabDocker epic #65 and its child stories.
══════════════════════════════════════════════════════════