Fix Dockerfile for Alpine, update deployment to use custom image
All checks were successful
Test CI / test (pull_request) Successful in 0s
All checks were successful
Test CI / test (pull_request) Successful in 0s
- Base image is Alpine Linux, not Debian - use apk instead of apt-get - Switch to root for package install, then back to user 1000 - Add musl-dev for C compilation, docker-cli for container builds - Update deployment to use registry.tail8d86e.ts.net/blumeops/forgejo-runner:latest Image built and pushed to zot registry. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
15976f90d6
commit
85941b5960
2 changed files with 11 additions and 5 deletions
|
|
@ -1,8 +1,11 @@
|
||||||
FROM code.forgejo.org/forgejo/runner:3.5.1
|
FROM code.forgejo.org/forgejo/runner:3.5.1
|
||||||
|
|
||||||
# The base image is Debian-based
|
# Switch to root to install packages
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# The base image is Alpine Linux
|
||||||
# Install tools needed for GitHub Actions and builds
|
# Install tools needed for GitHub Actions and builds
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apk add --no-cache \
|
||||||
# Required for actions/checkout and other Node-based actions
|
# Required for actions/checkout and other Node-based actions
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
|
|
@ -14,10 +17,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
make \
|
make \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
|
musl-dev \
|
||||||
# For container builds
|
# For container builds
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
docker.io \
|
docker-cli
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Verify tools are available
|
# Verify tools are available
|
||||||
RUN node --version && npm --version && docker --version
|
RUN node --version && npm --version && docker --version
|
||||||
|
|
||||||
|
# Switch back to non-root user
|
||||||
|
USER 1000
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ spec:
|
||||||
serviceAccountName: forgejo-runner
|
serviceAccountName: forgejo-runner
|
||||||
containers:
|
containers:
|
||||||
- name: runner
|
- name: runner
|
||||||
image: code.forgejo.org/forgejo/runner:3.5.1
|
image: registry.tail8d86e.ts.net/blumeops/forgejo-runner:latest
|
||||||
env:
|
env:
|
||||||
# Use internal k8s service via Tailscale operator egress
|
# Use internal k8s service via Tailscale operator egress
|
||||||
- name: FORGEJO_INSTANCE_URL
|
- name: FORGEJO_INSTANCE_URL
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue