| ci-bench: cross-platform CI race scaffold (rickub CI vs GitHub Actions) 0baf736 Olivier Girardot yesterday | 1 | # docker-build workload — multi-stage build against a digest-pinned base. |
| 2 | # |
| 3 | # The base is pinned to the exact alpine:3.20 digest rickub itself pins for its |
| 4 | # own CI images (images/firecracker/rootfs/Dockerfile in the rickub monorepo), |
| 5 | # i.e. a digest known to be stable and public. CAVEAT (documented in README): |
| 6 | # `apk add` inside the builder still floats with the Alpine mirror at run time; |
| 7 | # a truly bit-frozen build would vendored-package the toolchain, which would |
| 8 | # remove the network component this workload deliberately measures. |
| 9 | |
| 10 | # syntax=docker/dockerfile:1 |
| 11 | ARG ALPINE_IMAGE=alpine:3.20@sha256:d9e853e87e55526f6b2917df91a2115c36dd7c696a35be12163d44e6e2a4b6bc |
| 12 | |
| 13 | # --- builder: fetch toolchain, compile -------------------------------------- |
| 14 | FROM ${ALPINE_IMAGE} AS builder |
| 15 | RUN apk add --no-cache build-base |
| 16 | WORKDIR /src |
| 17 | COPY main.c . |
| 18 | RUN cc -O2 -static -o ci-bench-docker main.c |
| 19 | |
| 20 | # --- final: tiny image, just the static binary ------------------------------ |
| 21 | FROM ${ALPINE_IMAGE} |
| 22 | WORKDIR / |
| 23 | COPY --from=builder /src/ci-bench-docker /usr/local/bin/ci-bench-docker |
| 24 | # Expected output: ci-bench-docker-a56ee6092483 |
| 25 | CMD ["/usr/local/bin/ci-bench-docker"] |