FROM ghcr.io/cgwalters/c9s-oscore AS oscore FROM docker.io/opensuse/tumbleweed:latest AS builder RUN mkdir /newroot RUN zypper -n --gpg-auto-import-keys ar https://download.opensuse.org/tumbleweed/repo/oss/ oss RUN zypper -n --gpg-auto-import-keys ar obs://home:smolsheep/openSUSE_Tumbleweed sheep RUN zypper -n --gpg-auto-import-keys ref RUN zypper -n in libostree libcap-progs # TODO: Remove RUN zypper --root /newroot -n --gpg-auto-import-keys ar https://download.opensuse.org/tumbleweed/repo/oss/ oss RUN zypper --root /newroot -n --gpg-auto-import-keys ar obs://home:smolsheep/openSUSE_Tumbleweed sheep RUN zypper --root /newroot -n --gpg-auto-import-keys ref RUN zypper --root /newroot -n in kernel-default systemd-boot zypper bash man vim shadow util-linux dosfstools openSUSE-release composefs bootc libostree libcap-progs RUN mv /newroot/home /newroot/var/ RUN ln -s var/home /newroot/home RUN mv /newroot/mnt /newroot/var/ RUN ln -s var/mnt /newroot/mnt RUN rmdir /newroot/var/opt RUN mv /newroot/opt /newroot/var/ RUN ln -s var/opt /newroot/opt RUN mv /newroot/root /newroot/var/roothome RUN ln -s var/roothome /newroot/root RUN mv /newroot/srv /newroot/var/srv RUN ln -s var/srv /newroot/srv COPY ostree-0-integration.conf /newroot/usr/lib/tmpfiles.d/ RUN mkdir -p /newroot/sysroot/ostree RUN ln -s sysroot/ostree /newroot/ostree RUN ostree --repo=/repo init --mode=bare RUN ostree --repo=/repo commit --orphan --tree=dir=/newroot --no-xattrs RUN rm /repo/.lock RUN mv /repo /newroot/sysroot/ostree/ FROM scratch COPY --from=builder /newroot / RUN ln -s /usr/bin/true /usr/bin/dnf LABEL ostree.bootable="true"