kamilyon/Containerfile

50 lines
1.6 KiB
Text
Raw Permalink Normal View History

2023-07-24 17:53:43 +00:00
FROM ghcr.io/cgwalters/c9s-oscore AS oscore
2024-07-29 00:27:23 +00:00
FROM docker.io/opensuse/tumbleweed:latest AS builder
2023-07-24 17:53:43 +00:00
RUN mkdir /newroot
2024-07-29 00:27:23 +00:00
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
2023-07-24 17:53:43 +00:00
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 /
2024-07-29 00:27:23 +00:00
RUN ln -s /usr/bin/true /usr/bin/dnf
2023-07-24 17:53:43 +00:00
LABEL ostree.bootable="true"