diff --git a/ironic-ipa-downloader-image/Dockerfile b/ironic-ipa-downloader-image/Dockerfile index 1122428..ed59016 100644 --- a/ironic-ipa-downloader-image/Dockerfile +++ b/ironic-ipa-downloader-image/Dockerfile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 #!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.3 #!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader:3.0.3-%RELEASE% -#!BuildVersion: 15.6 ARG SLE_VERSION FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro diff --git a/ironic-ipa-downloader-image/Dockerfile.aarch64 b/ironic-ipa-downloader-image/Dockerfile.aarch64 new file mode 100644 index 0000000..961b1c2 --- /dev/null +++ b/ironic-ipa-downloader-image/Dockerfile.aarch64 @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.3 +#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-aarch64:3.0.3-%RELEASE% +ARG SLE_VERSION +FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro + +FROM registry.suse.com/bci/bci-base:$SLE_VERSION AS base +COPY --from=micro / /installroot/ +RUN sed -i -e 's%^# rpm.install.excludedocs = no.*%rpm.install.excludedocs = yes%g' /etc/zypp/zypp.conf +RUN zypper --installroot /installroot --non-interactive install --no-recommends ironic-ipa-ramdisk-aarch64 tar gawk curl xz zstd shadow cpio findutils + +RUN cp /usr/bin/getopt /installroot/ + +FROM micro AS final + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=com.suse.application.ironic +LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" +LABEL org.opencontainers.image.title="SLE Based Ironic IPA Downloader Container Image" +LABEL org.opencontainers.image.description="ironic-ipa-downloader based on the SLE Base Container Image." +LABEL org.opencontainers.image.version="3.0.3" +LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.3-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" +LABEL com.suse.eula="SUSE Combined EULA February 2024" +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" +LABEL com.suse.image-type="application" +LABEL com.suse.release-stage="released" +# endlabelprefix + +COPY --from=base /installroot / +RUN cp /getopt /usr/bin/ +RUN cp /srv/tftpboot/openstack-ironic-image/initrd*.zst /tmp +RUN cp /srv/tftpboot/openstack-ironic-image/openstack-ironic-image*.kernel /tmp +RUN sha256sum /srv/tftpboot/openstack-ironic-image/initrd*.zst /srv/tftpboot/openstack-ironic-image/openstack-ironic-image*.kernel > /tmp/images.sha256 +# configure non-root user +COPY configure-nonroot.sh /bin/ +RUN set -euo pipefail; chmod +x /bin/configure-nonroot.sh +RUN set -euo pipefail; /bin/configure-nonroot.sh && rm -f /bin/configure-nonroot.sh +COPY get-resource.sh /usr/local/bin/get-resource.sh + +RUN set -euo pipefail; chmod +x /usr/local/bin/get-resource.sh diff --git a/ironic-ipa-downloader-image/Dockerfile.x86_64 b/ironic-ipa-downloader-image/Dockerfile.x86_64 new file mode 100644 index 0000000..c62b7dd --- /dev/null +++ b/ironic-ipa-downloader-image/Dockerfile.x86_64 @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.3 +#!BuildTag: %%IMG_PREFIX%%ironic-ipa-downloader-x86_64:3.0.3-%RELEASE% +ARG SLE_VERSION +FROM registry.suse.com/bci/bci-micro:$SLE_VERSION AS micro + +FROM registry.suse.com/bci/bci-base:$SLE_VERSION AS base +COPY --from=micro / /installroot/ +RUN sed -i -e 's%^# rpm.install.excludedocs = no.*%rpm.install.excludedocs = yes%g' /etc/zypp/zypp.conf +RUN zypper --installroot /installroot --non-interactive install --no-recommends ironic-ipa-ramdisk-x86_64 tar gawk curl xz zstd shadow cpio findutils + +RUN cp /usr/bin/getopt /installroot/ + +FROM micro AS final + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=com.suse.application.ironic +LABEL org.opencontainers.image.authors="SUSE LLC (https://www.suse.com/)" +LABEL org.opencontainers.image.title="SLE Based Ironic IPA Downloader Container Image" +LABEL org.opencontainers.image.description="ironic-ipa-downloader based on the SLE Base Container Image." +LABEL org.opencontainers.image.version="3.0.3" +LABEL org.opencontainers.image.url="https://www.suse.com/solutions/edge-computing/" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%ironic-ipa-downloader:3.0.3-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" +LABEL com.suse.eula="SUSE Combined EULA February 2024" +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" +LABEL com.suse.image-type="application" +LABEL com.suse.release-stage="released" +# endlabelprefix + +COPY --from=base /installroot / +RUN cp /getopt /usr/bin/ +RUN cp /srv/tftpboot/openstack-ironic-image/initrd*.zst /tmp +RUN cp /srv/tftpboot/openstack-ironic-image/openstack-ironic-image*.kernel /tmp +RUN sha256sum /srv/tftpboot/openstack-ironic-image/initrd*.zst /srv/tftpboot/openstack-ironic-image/openstack-ironic-image*.kernel > /tmp/images.sha256 +# configure non-root user +COPY configure-nonroot.sh /bin/ +RUN set -euo pipefail; chmod +x /bin/configure-nonroot.sh +RUN set -euo pipefail; /bin/configure-nonroot.sh && rm -f /bin/configure-nonroot.sh +COPY get-resource.sh /usr/local/bin/get-resource.sh + +RUN set -euo pipefail; chmod +x /usr/local/bin/get-resource.sh diff --git a/ironic-ipa-downloader-image/_multibuild b/ironic-ipa-downloader-image/_multibuild new file mode 100644 index 0000000..bf3a1af --- /dev/null +++ b/ironic-ipa-downloader-image/_multibuild @@ -0,0 +1,4 @@ + + x86_64 + aarch64 + diff --git a/ironic-ipa-downloader-image/_service b/ironic-ipa-downloader-image/_service index 355a193..8399434 100644 --- a/ironic-ipa-downloader-image/_service +++ b/ironic-ipa-downloader-image/_service @@ -2,6 +2,8 @@ + Dockerfile.aarch64 + Dockerfile.x86_64 Dockerfile IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) IMG_PREFIX