Skip to content

Commit

Permalink
use bci-base to run zypper then layer the result onto bci-micro (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Kim <[email protected]>
  • Loading branch information
Oats87 authored Sep 3, 2024
1 parent 7a695b3 commit 864635c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
FROM registry.suse.com/bci/bci-micro:15.6
FROM registry.suse.com/bci/bci-micro:15.6 AS final

RUN zypper in -y openssl patterns-base-fips
# Temporary build stage image
FROM registry.suse.com/bci/bci-base:15.6 AS builder

# Install system packages using builder image that has zypper
COPY --from=final / /chroot/

RUN zypper refresh && \
zypper --installroot /chroot -n in --no-recommends \
openssl patterns-base-fips && \
zypper --installroot /chroot clean -a && \
rm -rf /chroot/var/cache/zypp/* /chroot/var/log/zypp/* /chroot/tmp/* /chroot/var/tmp/* /chroot/usr/share/doc/packages/*

# Main stage using bci-micro as the base image
FROM final

# Copy binaries and configuration files from builder to micro
COPY --from=builder /chroot/ /

COPY bin/rancher-system-agent /usr/bin/
RUN chmod +x /usr/bin/rancher-system-agent
Expand Down

0 comments on commit 864635c

Please sign in to comment.