|
1 | | -# Mock Runner Image for GNOME 50 / CentOS Stream 10 builds |
| 1 | +# Mock Runner Image |
2 | 2 | # |
3 | | -# Bakes in: |
4 | | -# - mock + toolchain (rpm-build, createrepo_c, rpmdevtools, spectool) |
5 | | -# - centos-stream-10-ci mock config |
6 | | -# - Pre-bootstrapped CentOS Stream 10 mock chroot |
| 3 | +# Fedora + mock toolchain only. The CentOS Stream 10 build environment is |
| 4 | +# sourced at build time via mock's use_bootstrap_image, which pulls |
| 5 | +# quay.io/centos/centos:stream10 through podman. No chroot baked in. |
7 | 6 | # |
8 | | -# Build (requires --privileged for mock --init): |
9 | | -# podman build --privileged -f mock/Containerfile -t mock-runner:local mock/ |
| 7 | +# Build: |
| 8 | +# podman build -f mock/Containerfile -t mock-runner:local mock/ |
10 | 9 | # |
11 | 10 | # Push: |
12 | 11 | # podman tag mock-runner:local ghcr.io/tuna-os/mock-runner:centos-stream-10 |
13 | 12 | # podman push ghcr.io/tuna-os/mock-runner:centos-stream-10 |
14 | 13 |
|
15 | 14 | FROM fedora:latest |
16 | 15 |
|
17 | | -# Install build toolchain |
18 | 16 | RUN dnf install -y \ |
19 | 17 | mock \ |
20 | 18 | rpm-build \ |
21 | 19 | rpm-sign \ |
22 | 20 | createrepo_c \ |
23 | 21 | rpmdevtools \ |
24 | 22 | python3-pyyaml \ |
25 | | - git \ |
26 | 23 | && dnf clean all \ |
27 | 24 | && rm -rf /var/cache/dnf |
28 | 25 |
|
29 | | -# Copy mock config into place |
30 | 26 | COPY centos-stream-10-ci.cfg /etc/mock/centos-stream-10-ci.cfg |
31 | 27 |
|
32 | | -# Create an empty local repo so mock --init doesn't fail on the |
33 | | -# file:///local-repo baseurl (it'll be bind-mounted at build time) |
34 | | -RUN mkdir -p /local-repo && createrepo_c /local-repo |
35 | | - |
36 | | -# Bootstrap the CentOS Stream 10 chroot. |
37 | | -# This downloads ~400 MB of base packages once and bakes them into the image. |
38 | | -# Subsequent `mock --rebuild --no-clean` invocations skip this phase entirely. |
39 | | -RUN mock --init -r centos-stream-10-ci \ |
40 | | - --no-cleanup-after \ |
41 | | - && echo "Bootstrap complete" \ |
42 | | - # Remove cached RPMs inside the chroot and build logs to trim image size |
43 | | - && find /var/lib/mock/centos-stream-10-ci/ \ |
44 | | - \( -name "*.rpm" -o -name "*.log" \) -delete \ |
45 | | - && rm -rf /var/lib/mock/centos-stream-10-ci/root/var/cache/dnf \ |
46 | | - && rm -rf /var/lib/mock/centos-stream-10-ci-bootstrap/root/var/cache/dnf |
47 | | - |
48 | | -LABEL org.opencontainers.image.description="Fedora + mock with CentOS Stream 10 chroot pre-bootstrapped" |
| 28 | +LABEL org.opencontainers.image.description="Fedora + mock runner for CentOS Stream 10 package builds" |
49 | 29 | LABEL org.opencontainers.image.source="https://github.com/tuna-os/github-copr" |
50 | | -# Fri Mar 13 06:47:58 AM IST 2026 |
0 commit comments