File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
- # This container build is just a demo effectively; it shows how one might
2
- # build bootc in a container flow, using Fedora ELN as the target.
3
- FROM quay.io/centos-bootc/centos-bootc:stream9 as build
4
- RUN dnf config-manager --set-enabled crb && dnf -y install cargo ostree-devel openssl-devel && dnf clean all
1
+ # Build bootc from the current git into a c9s-bootc container image.
2
+ # Use e.g. --build-arg=base=quay.io/fedora/fedora-bootc:40 to target
3
+ # Fedora instead.
4
+ ARG base=quay.io/centos-bootc/centos-bootc:stream9
5
+ FROM $base as build
6
+ COPY hack/build.sh /build.sh
7
+ RUN /build.sh && rm -v /build.sh
5
8
COPY . /build
6
9
WORKDIR /build
7
10
RUN mkdir -p /build/target/dev-rootfs # This can hold arbitrary extra content
8
11
# See https://www.reddit.com/r/rust/comments/126xeyx/exploring_the_problem_of_faster_cargo_docker/
9
12
# We aren't using the full recommendations there, just the simple bits.
10
13
RUN --mount=type=cache,target=/build/target --mount=type=cache,target=/var/roothome make bin-archive && mkdir -p /out && cp target/bootc.tar.zst /out
11
14
12
- FROM quay.io/centos-bootc/centos-bootc:stream9
15
+ FROM $base
13
16
COPY --from=build /out/bootc.tar.zst /tmp
14
17
COPY --from=build /build/target/dev-rootfs/ /
15
18
RUN tar -C / --zstd -xvf /tmp/bootc.tar.zst && rm -vf /tmp/*
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -xeu
3
+ . /usr/lib/os-release
4
+ case $ID in
5
+ centos|rhel) dnf config-manager --set-enabled crb;;
6
+ fedora) dnf -y install dnf-utils ;;
7
+ esac
8
+ dnf -y builddep bootc
You can’t perform that action at this time.
0 commit comments