Skip to content

Commit

Permalink
Containerfile: squash dnf commands
Browse files Browse the repository at this point in the history
Squash the DNF commands together and add a cleaning command to the end
of it. This makes fewer layers and keeps the image size slightly
smaller.

Signed-off-by: Simon de Vlieger <[email protected]>
  • Loading branch information
supakeen committed Dec 16, 2024
1 parent 2ca63b4 commit eaf65a3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ WORKDIR /build
RUN go build -tags "containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" ./cmd/image-builder

FROM registry.fedoraproject.org/fedora:41

# Fast-track osbuild so we don't depend on the "slow" Fedora release process to implement new features in bib
RUN dnf install -y dnf-plugins-core
# why is this needed?
RUN dnf install -y libxcrypt-compat
RUN dnf install -y wget
RUN dnf copr enable -y @osbuild/osbuild
RUN dnf install -y osbuild osbuild-ostree osbuild-depsolve-dnf osbuild-lvm2
RUN dnf install -y dnf-plugins-core \
&& dnf copr enable -y @osbuild/osbuild \
&& dnf install -y libxcrypt-compat wget osbuild osbuild-ostree osbuild-depsolve-dnf osbuild-lvm2 \
&& dnf clean all

COPY --from=builder /build/image-builder /usr/bin/

# install repo data from osbuild-composer in an ugly way
Expand Down

0 comments on commit eaf65a3

Please sign in to comment.