github.com/anchore/syft@v1.38.2/cmd/syft/internal/test/integration/test-fixtures/image-vertical-package-dups/Dockerfile (about) 1 FROM --platform=linux/amd64 rockylinux:9.3.20231119@sha256:d644d203142cd5b54ad2a83a203e1dee68af2229f8fe32f52a30c6e1d3c3a9e0 AS base 2 3 # modifying the RPM DB multiple times will result in duplicate packages when using all-layers (if there was no de-dup logic) 4 # curl is tricky, it already exists in the image and is being upgraded 5 6 # but... we want to make the test image as small as possible, so we are making the changes in stages and then 7 # copying the RPM DB from each stage to a final stage in separate layers. This will result in a much smaller image. 8 9 FROM base AS stage1 10 RUN dnf install -y wget-1.21.1-8.el9_4 11 12 FROM stage1 AS stage2 13 RUN dnf update -y curl-minimal-7.76.1-31.el9_6.1 14 15 FROM stage2 AS stage3 16 RUN dnf install -y vsftpd-3.0.5-6.el9 17 18 FROM stage3 AS stage4 19 RUN dnf install -y httpd-2.4.62-4.el9_6.4 20 21 FROM scratch 22 23 COPY --from=base /var/lib/rpm /var/lib/rpm 24 COPY --from=stage1 /var/lib/rpm /var/lib/rpm 25 COPY --from=stage2 /var/lib/rpm /var/lib/rpm 26 COPY --from=stage3 /var/lib/rpm /var/lib/rpm 27 COPY --from=stage4 /var/lib/rpm /var/lib/rpm