@@ -4,41 +4,35 @@ FROM quay.io/fedora/fedora:43
44WORKDIR /root/containerbuild
55# This variable is enabled by Konflux to build the container image hermatically.
66ARG NO_NETWORK=0
7-
87# Keep this Dockerfile idempotent for local development rebuild use cases.
98USER root
10- RUN rm -rfv /usr/lib/coreos-assembler /usr/bin/coreos-assembler
119
1210COPY ./src/print-dependencies.sh ./src/deps*.txt ./src/vmdeps*.txt ./src/build-deps.txt /root/containerbuild/src/
1311COPY ./build.sh /root/containerbuild/
14- RUN ./build.sh configure_yum_repos
15- RUN ./build.sh install_rpms
16- RUN ./build.sh install_ocp_tools
17- RUN ./build.sh trust_redhat_gpg_keys
12+ RUN rm -rfv /usr/lib/coreos-assembler /usr/bin/coreos-assembler \
13+ && ./build.sh configure_yum_repos \
14+ && ./build.sh install_rpms \
15+ && ./build.sh install_ocp_tools \
16+ && ./build.sh trust_redhat_gpg_keys
1817
1918COPY ./ /root/containerbuild/
20- RUN ./build.sh write_archive_info
21- RUN ./build.sh make_and_makeinstall
22- RUN ./build.sh configure_user
23- RUN ./build.sh patch_osbuild
24-
25- # clean up scripts (it will get cached in layers, but oh well)
26- WORKDIR /srv/
27- RUN chown builder: /srv
28- RUN rm -rf /root/containerbuild
29-
30- # allow writing to /etc/passwd from arbitrary UID
31- # https://docs.openshift.com/container-platform/4.8/openshift_images/create-images.html
32- RUN chmod g=u /etc/passwd
33-
34- # also allow adding certificates
35- RUN chmod -R g=u /etc/pki/ca-trust
36-
37- # This allows Prow jobs for other projects to use our cosa image as their
38- # buildroot image (so clonerefs can copy the repo into `/go`). For cosa itself,
39- # this same hack is inlined in the YAML (see openshift/release link above).
40- RUN mkdir -p /go && chmod 777 /go
41-
42- # run as `builder` user
19+ RUN ./build.sh write_archive_info \
20+ && ./build.sh make_and_makeinstall \
21+ && ./build.sh configure_user \
22+ && ./build.sh patch_osbuild \
23+ # clean up scripts (it will get cached in layers, but oh well)
24+ && chown builder: /srv \
25+ && rm -rf /root/containerbuild \
26+ # allow writing to /etc/passwd from arbitrary UID
27+ # https://docs.openshift.com/container-platform/4.8/openshift_images/create-images.html
28+ && chmod g=u /etc/passwd \
29+ # also allow adding certificates
30+ && chmod -R g=u /etc/pki/ca-trust \
31+ # This allows Prow jobs for other projects to use our cosa image as their
32+ # buildroot image (so clonerefs can copy the repo into `/go`). For cosa itself,
33+ # this same hack is inlined in the YAML (see openshift/release link above).
34+ && mkdir -p /go && chmod 777 /go
35+
36+ # run as `builder` user
4337USER builder
4438ENTRYPOINT ["/usr/bin/dumb-init" , "/usr/bin/coreos-assembler" ]
0 commit comments