The first image.yml run that built mortis/ci (run 2246, job 2269) built the whole image, then failed pushing it: 413 Payload Too Large from Cloudflare on every retry. The build printed the sizes:
Path
Uncompressed
/opt/pre-commit
377 MB
repo91aq4otb, repoyc4c93bl (gitleaks, actionlint)
176 MB, 172 MB
/opt/python
121 MB
/opt/venv
98 MB
pre-commit downloads a Go toolchain into <env>/.go for each Go hook and keeps it; at run time only the built binaries in <env>/bin run.
Change (images/ci/Dockerfile only)
Run the yamllint, gitleaks and actionlint hooks on a staged sample, delete repo*/golangenv-*/.go and the Go build cache, then run the three hooks again. An incomplete or broken cache fails the image build, not the jobs. Expected /opt/pre-commit size: roughly 40 MB.
The python3.X symlink loop ran under sh -c without -e, so only the last iteration decided the status; the RUN now starts with set -eu.
Verification
image.yml only runs on main, so the next push builds it. If a layer is still over the limit, the 413 log will show it; the venv (98 MB) and interpreters (121 MB) should compress to well under 100 MB each. Nothing consumes the image yet.
## Problem
The first `image.yml` run that built `mortis/ci` (run 2246, job 2269) built the whole image, then failed pushing it: `413 Payload Too Large` from Cloudflare on every retry. The build printed the sizes:
| Path | Uncompressed |
|---|---|
| `/opt/pre-commit` | 377 MB |
| `repo91aq4otb`, `repoyc4c93bl` (gitleaks, actionlint) | 176 MB, 172 MB |
| `/opt/python` | 121 MB |
| `/opt/venv` | 98 MB |
pre-commit downloads a Go toolchain into `<env>/.go` for each Go hook and keeps it; at run time only the built binaries in `<env>/bin` run.
## Change (`images/ci/Dockerfile` only)
- Run the `yamllint`, `gitleaks` and `actionlint` hooks on a staged sample, delete `repo*/golangenv-*/.go` and the Go build cache, then run the three hooks again. An incomplete or broken cache fails the image build, not the jobs. Expected `/opt/pre-commit` size: roughly 40 MB.
- The `python3.X` symlink loop ran under `sh -c` without `-e`, so only the last iteration decided the status; the RUN now starts with `set -eu`.
## Verification
`image.yml` only runs on `main`, so the next push builds it. If a layer is still over the limit, the 413 log will show it; the venv (98 MB) and interpreters (121 MB) should compress to well under 100 MB each. Nothing consumes the image yet.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The first push of mortis/ci failed with 413 Payload Too Large: the
/opt/pre-commit layer was 377 MB, of which two environments of 172 and
176 MB (gitleaks and actionlint) each hold their own Go toolchain
(pre-commit keeps <env>/.go; only the built binaries in <env>/bin run).
Run the yamllint, gitleaks and actionlint hooks on a staged sample, delete
the toolchains and the Go build cache, and run the three hooks again, so a
cache that no longer works fails the build instead of the jobs.
Also stop the python3.X symlink loop from hiding a broken link (the RUN had
no -e, so only the last iteration decided the status).
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MmzvM9skAvYcph2c9EiPcm
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The first
image.ymlrun that builtmortis/ci(run 2246, job 2269) built the whole image, then failed pushing it:413 Payload Too Largefrom Cloudflare on every retry. The build printed the sizes:/opt/pre-commitrepo91aq4otb,repoyc4c93bl(gitleaks, actionlint)/opt/python/opt/venvpre-commit downloads a Go toolchain into
<env>/.gofor each Go hook and keeps it; at run time only the built binaries in<env>/binrun.Change (
images/ci/Dockerfileonly)yamllint,gitleaksandactionlinthooks on a staged sample, deleterepo*/golangenv-*/.goand the Go build cache, then run the three hooks again. An incomplete or broken cache fails the image build, not the jobs. Expected/opt/pre-commitsize: roughly 40 MB.python3.Xsymlink loop ran undersh -cwithout-e, so only the last iteration decided the status; the RUN now starts withset -eu.Verification
image.ymlonly runs onmain, so the next push builds it. If a layer is still over the limit, the 413 log will show it; the venv (98 MB) and interpreters (121 MB) should compress to well under 100 MB each. Nothing consumes the image yet.🤖 Generated with Claude Code