# SPDX-License-Identifier: GPL-3.0-or-later

#     Copyright (c) 2025 SUSE LLC

# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon.

# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
# It is maintained by the BCI team and generated by
# https://github.com/SUSE/BCI-dockerfile-generator

# Please submit bugfixes or comments via https://bugs.opensuse.org/
# You can contact the BCI team via https://github.com/SUSE/bci/discussions

#!UseOBSRepositories

#!BuildTag: bci/kiwi:10.1.16-%RELEASE%
#!BuildTag: bci/kiwi:10.1.16
#!BuildTag: bci/kiwi:10.1
#!BuildTag: bci/kiwi:10
#!BuildName: bci-kiwi-10.1
#!BuildVersion: 16.0.10.1
FROM bci/bci-base:16.0

RUN set -euo pipefail; \
    zypper -n install --no-recommends checkmedia dracut-kiwi-oem-repart enchant-devel gcc glibc-devel iproute2 java-21-openjdk-headless jing kiwi-systemdeps-filesystems kpartx libxml2-devel lvm2 make netcat-openbsd python3-devel python3-kiwi python3-pip tack timezone xorriso xz SLES-release curl findutils gawk git-core procps util-linux; \
    zypper -n clean; \
    rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}

# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.bci.kiwi
LABEL org.opencontainers.image.authors="https://github.com/SUSE/bci/discussions"
LABEL org.opencontainers.image.title="SLE BCI KIWI Appliance Builder (kiwi)"
LABEL org.opencontainers.image.description="KIWI Appliance Builder (kiwi) container based on the SLE Base Container Image. This container is only supported in privileged mode."
LABEL org.opencontainers.image.version="10.1.16"
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opencontainers.image.ref.name="10.1.16-%RELEASE%"
LABEL org.opensuse.reference="registry.suse.com/bci/kiwi:10.1.16-%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL com.suse.supportlevel="techpreview"
LABEL com.suse.eula="sle-bci"
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle"
LABEL com.suse.release-stage="beta"
# endlabelprefix
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md"
LABEL usage="This container requires an openSUSE/SUSE host kernel for full functionality."
# sanity check that the version from the tag is equal to the version of python3-kiwi that we expect
RUN set -euo pipefail; \
    [ "$(rpm -q --qf '%{version}' python3-kiwi | \
    cut -d '.' -f -2)" = "10.1" ]
RUN set -euo pipefail; printf "mapper:\n  - part_mapper: kpartx\n" > /etc/kiwi.yml
