Stop the CI jobs that can never pass here: no docker daemon, and CodeQL needs GitHub #575

Merged
jaylouisw merged 2 commits from ci/docker-job-without-daemon into main 2026-11-08 06:47:00 +00:00
Owner

Forgejo reads .github/workflows as well as .forgejo/workflows, and the runner is a single container job image (node:20-bookworm) with no docker binary and no /var/run/docker.sock. Two consequences, both permanent red checks on every pull request for reasons unrelated to the change:

  1. Docker build was a bare docker build. Verified: docker run --rm node:20-bookworm sh -c 'command -v docker' -> NO_DOCKER_IN_JOB_IMAGE; no socket either. It now validates the Dockerfile statically (base pinned, non-root, healthcheck, CMD/ENTRYPOINT, every COPY source and the entrypoint exist) and runs the real build only where a daemon is available, saying so when it is not. The Dockerfile is sound: docker build -t packetforge:ci . succeeds locally and produces an image, so the static check is a floor, not a substitute.
  2. Analyze (CodeQL) uploads SARIF to github.com with a GitHub token - impossible here, so it failed on every push including main. It, the duplicate copy of the CI matrix, the GHCR release job and the labeler now carry if: github.server_url == 'https://github.com': skipped on Forgejo, unchanged on the mirror.

Net effect: the Forgejo queue stops burning its single runner on jobs that cannot pass, and a red check means something again.

Forgejo reads `.github/workflows` as well as `.forgejo/workflows`, and the runner is a single container job image (`node:20-bookworm`) with **no docker binary and no `/var/run/docker.sock`**. Two consequences, both permanent red checks on every pull request for reasons unrelated to the change: 1. **Docker build** was a bare `docker build`. Verified: `docker run --rm node:20-bookworm sh -c 'command -v docker'` -> `NO_DOCKER_IN_JOB_IMAGE`; no socket either. It now validates the Dockerfile **statically** (base pinned, non-root, healthcheck, CMD/ENTRYPOINT, every COPY source and the entrypoint exist) and runs the real build only where a daemon is available, saying so when it is not. The Dockerfile is sound: `docker build -t packetforge:ci .` succeeds locally and produces an image, so the static check is a floor, not a substitute. 2. **Analyze (CodeQL)** uploads SARIF to github.com with a GitHub token - impossible here, so it failed on every push including `main`. It, the duplicate copy of the CI matrix, the GHCR release job and the labeler now carry `if: github.server_url == 'https://github.com'`: skipped on Forgejo, unchanged on the mirror. Net effect: the Forgejo queue stops burning its single runner on jobs that cannot pass, and a red check means something again.
Fix the Docker job that could never pass
All checks were successful
CI / Test (Node 18) (pull_request) Successful in 1m10s
CI / Test (Node 20) (pull_request) Successful in 1m9s
CI / Test (Node 22) (pull_request) Successful in 1m10s
CI / Server smoke test (pull_request) Successful in 26s
CI / Docker build (pull_request) Successful in 11s
6674201da7
The docker job was a bare `docker build`. The runner's job image is node:20-bookworm, which
has no docker binary and no /var/run/docker.sock - verified directly:

    docker run --rm node:20-bookworm sh -c 'command -v docker'
    -> NO_DOCKER_IN_JOB_IMAGE
    docker run --rm node:20-bookworm ls -l /var/run/docker.sock
    -> No such file or directory

So that check was red on every pull request for reasons that had nothing to do with the
change, which is enough to make people ignore CI entirely.

The job now validates the Dockerfile statically first - base image pinned, not root,
healthcheck present, CMD/ENTRYPOINT present, every COPY source exists, entrypoint script
exists - and then runs the real `docker build` only where a daemon is actually available,
saying plainly in the log when it is not. The Dockerfile itself is sound: `docker build -t
packetforge:ci .` succeeds locally and produces an image, so the static checks are a floor,
not a substitute.

scripts/check-dockerfile.js is a normal script, so it runs identically on a laptop.
jaylouisw changed title from Fix the Docker job that could never pass to Stop the CI jobs that can never pass here: no docker daemon, and CodeQL needs GitHub 2026-11-08 06:32:40 +00:00
Stop running the GitHub-only workflows on the Forgejo runner
All checks were successful
CI / Test (Node 18) (pull_request) Successful in 1m8s
CI / Test (Node 20) (pull_request) Successful in 1m2s
CI / Test (Node 22) (pull_request) Successful in 1m3s
CI / Server smoke test (pull_request) Successful in 22s
CI / Docker build (pull_request) Successful in 10s
54358b6e96
Forgejo reads .github/workflows as well as .forgejo/workflows, so every job in there ran on
odin-runner too:

  - Analyze (CodeQL) uploads SARIF to github.com with a GitHub token. Impossible here, so it
    failed on every push, including main (cb2bc48, 41e7030, 51eba47).
  - A second copy of the CI matrix doubled the queue for every pull request, on a runner
    whose capacity is one.
  - The GHCR release job and the GitHub labeler are equally GitHub-only.

Each job now carries `if: github.server_url == 'https://github.com'`: skipped on Forgejo, unchanged
on the mirror. Nine jobs across five workflows; the Forgejo workflow is untouched.
jaylouisw force-pushed ci/docker-job-without-daemon from 54358b6e96
All checks were successful
CI / Test (Node 18) (pull_request) Successful in 1m8s
CI / Test (Node 20) (pull_request) Successful in 1m2s
CI / Test (Node 22) (pull_request) Successful in 1m3s
CI / Server smoke test (pull_request) Successful in 22s
CI / Docker build (pull_request) Successful in 10s
to 90ef1522dd
All checks were successful
CI / Test (Node 18) (pull_request) Successful in 1m6s
CI / Test (Node 20) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 1m2s
CI / Server smoke test (pull_request) Successful in 21s
CI / Docker build (pull_request) Successful in 7s
2026-11-08 06:41:04 +00:00
Compare
jaylouisw deleted branch ci/docker-job-without-daemon 2026-11-08 06:47:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!575
No description provided.