File Dockerfile.default-iso of Package elemental-base-os
#!BuildTag: uc-base-kernel-default-iso:%OS_VERSION_ID_SP%-%RELEASE%
#!BuildTag: uc-base-kernel-default-iso:latest
ARG OS_IMAGE=bci/bci-base
ARG OS_VERSION=16.0
ARG OS_BRANDING=SLE
FROM uc-base-os-kernel-default AS target
FROM ${OS_IMAGE}:${OS_VERSION} AS builder
COPY --from=target / /target
# TODO Shall we try to add selinux tools here?
RUN zypper --non-interactive --gpg-auto-import-keys install -- \
dosfstools \
elemental3ctl \
elemental3ctl-sysext \
grub2-common \
mtools \
squashfs \
xorriso \
rsync \
policycoreutils \
openSUSE-release \
openSUSE-release-appliance \
&& zypper clean --all
# Prepare the ISO overlay in /iso-overlay path
RUN mkdir -p /iso-overlay/extensions && \
cp /usr/share/suse-sysext-images/native/elemental3ctl_*.raw /iso-overlay/extensions
# The ISO name follows the naming pattern for KIWI to support static links in OBS
RUN elemental3ctl --debug build-installer \
--type iso \
--output /build \
--name "uc-base-kernel-default-iso.$(uname -m)-%OS_VERSION_ID_SP%-Build%RELEASE%" \
--os-image dir:///target \
--overlay dir:///iso-overlay \
--cmdline "console=ttyS0 enforcing=0" \
--install-cmdline "console=ttyS0"
FROM scratch
COPY --from=builder /build/ /iso/
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sl.micro
LABEL org.opencontainers.image.title="openSUSE Dumbledore Default ISO Installer Container"
LABEL org.opencontainers.image.description="Container image for openSUSE Dumbledore Default Installer - a containerized ISO installer."
LABEL org.opencontainers.image.version="%OS_VERSION_ID_SP%"
LABEL org.opencontainers.image.url="https://github.com/SUSE/elemental"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="registry.opensuse.org/%%IMG_PREFIX%%/uc-base-kernel-default-iso:%OS_VERSION_ID_SP%-%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix