Files
homelab/k8s/infra/forgejo-runner/Dockerfile.node
T
rock 6c751e7f93 fix: alpine base image requires apk, not apt-get + root user for package installs
Problem: Forgejo runner base image is Alpine, not Debian.
-  doesn't exist (Alpine uses )
- Runner user is 1000, can't modify apk database (permission denied)
- CI workflow used GitHub-specific conditionals (contains() doesn't work in Forgejo)

Fixes:
1. Replace apt-get with apk for all runner Dockerfiles
2. Switch to USER root before package installation
3. Switch back to runner user (1000:1000) after
4. Simplify build workflow: build all runners in loop (no conditionals)

Testing:
 Golang runner: docker, node, npm installed
 Node runner: docker, node, npm installed
 Rust runner: docker, node, npm installed

This enables:
- homelab-frontend CI to build/push api-gateway image
- Build workflow to run on node runner with docker available
- All three runners have docker-cli for CI workflows
2026-09-06 06:27:48 -07:00

17 lines
327 B
Docker

FROM code.forgejo.org/forgejo/runner:6
# Switch to root to install packages
USER root
# Alpine uses apk, not apt-get
RUN apk update && apk add --no-cache \
docker-cli \
nodejs \
npm
# Verify installations
RUN node --version && docker --version && git --version
# Switch back to runner user
USER 1000:1000