aboutsummaryrefslogtreecommitdiff
path: root/templates/bootcblade.containerfile.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/bootcblade.containerfile.j2')
-rw-r--r--templates/bootcblade.containerfile.j2110
1 files changed, 56 insertions, 54 deletions
diff --git a/templates/bootcblade.containerfile.j2 b/templates/bootcblade.containerfile.j2
index d5c0a17..636f7c9 100644
--- a/templates/bootcblade.containerfile.j2
+++ b/templates/bootcblade.containerfile.j2
@@ -1,69 +1,71 @@
-FROM quay.io/centos-bootc/centos-bootc:{{ bootc_image_tag if bootc_image_tag is defined else 'stream9' }}
+FROM quay.io/fedora/fedora-bootc:{{ bootc_image_tag if bootc_image_tag is defined else '40' }}
+
+ARG SKIP_ZFS={{ skip_zfs if skip_zfs is defined else 'False' }}
+ARG SKIP_KVM={{ skip_kvm if skip_kvm is defined else 'False' }}
+ARG SKIP_SHARES={{ skip_shares if skip_shares is defined else 'False' }}
# Create root homedir
RUN mkdir /var/roothome
-# ZFS
-RUN dnf -y install epel-release git && \
- dnf -y install https://zfsonlinux.org/fedora/zfs-release-2-4.fc38.noarch.rpm && \
- sed -i s/\$releasever/38/g /etc/yum.repos.d/zfs.repo && \
- dnf -y install kernel-devel-$(ls /usr/lib/modules) && \
- dnf -y install zfs && \
- dnf clean all && \
- dkms build zfs/$(rpm -q --qf '%{VERSION}' zfs) -k $(ls /usr/lib/modules) && \
- dkms install zfs/$(rpm -q --qf '%{VERSION}' zfs) -k $(ls /usr/lib/modules)
-
-# KVM & Cockpit
-RUN echo "qemu:x:107:107:qemu user:/:/sbin/nologin" >> /etc/passwd && \
- dnf -y install qemu-kvm libvirt virt-install virt-viewer && \
- dnf -y install cockpit-bridge cockpit-machines cockpit-pcp cockpit-podman cockpit-storaged cockpit-system cockpit-files cockpit-selinux cockpit-ostree && \
- systemctl enable libvirt-guests && \
+# Basic Tools
+RUN dnf -y install git vim podman fish ansible wget dstat byobu smartmontools hdparm wireguard-tools NetworkManager-wifi rsync && \
+ dnf -y install `curl -s https://api.github.com/repos/ClementTsang/bottom/releases/latest | grep "browser_download" |grep -v musl |grep ".rpm" |awk -F '"' '{print $4}'` && \
+ dnf -y install cockpit-bridge cockpit-pcp cockpit-podman cockpit-storaged cockpit-system cockpit-selinux cockpit-ostree cockpit-networkmanager && \
dnf clean all
-# Cockpit ZFS Manager
-RUN git clone https://github.com/45drives/cockpit-zfs-manager.git /root/cockpit-zfs-manager && \
- cp -r /root/cockpit-zfs-manager/zfs /usr/share/cockpit && \
- rm -r /root/cockpit-zfs-manager && \
-# Fix cockpit fonts/icons https://github.com/45Drives/scripts/blob/main/cockpit_font_fix/fix-cockpit.sh
- mkdir -p /usr/share/cockpit/base1/fonts && \
- curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/fontawesome.woff -o /usr/share/cockpit/base1/fonts/fontawesome.woff && \
- curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/glyphicons.woff -o /usr/share/cockpit/base1/fonts/glyphicons.woff && \
- curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/patternfly.woff -o /usr/share/cockpit/base1/fonts/patternfly.woff && \
- mkdir -p /usr/share/cockpit/static/fonts && \
- curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/OpenSans-Semibold-webfont.woff -o /usr/share/cockpit/static/fonts/OpenSans-Semibold-webfont.woff
-
-# Cockpit file sharing, and Samba users
-RUN dnf -y install perl samba-common-tools nfs-utils samba-winbind-clients && \
- dnf clean all && \
- rpm --nodeps -i https://github.com/45Drives/cockpit-identities/releases/download/v0.1.12/cockpit-identities-0.1.12-1.el8.noarch.rpm && \
- rpm --nodeps -i https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.3.7/cockpit-file-sharing-3.3.7-1.el8.noarch.rpm
+# Allow sudo without password
+RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wheel-passwordless-sudo
-# Sanoid & Syncoid
-RUN git clone https://github.com/jimsalterjrs/sanoid.git /root/sanoid && \
- cd /root/sanoid && git checkout $(git tag | grep "^v" | tail -n 1) && cp sanoid syncoid findoid sleepymutex /usr/local/sbin && \
- mkdir /etc/sanoid && cp sanoid.defaults.conf /etc/sanoid && touch /etc/sanoid/sanoid.conf && cp sanoid.conf /etc/sanoid/sanoid.example.conf && \
- rm -r /root/sanoid
-RUN dnf -y install perl-Data-Dumper perl-Getopt-Long lzop mbuffer mhash pv && \
- dnf clean all && \
- PERL_MM_USE_DEFAULT=1 cpan install Capture::Tiny && PERL_MM_USE_DEFAULT=1 cpan install Config::IniFiles
+# Fix for man pages
+RUN ln -s /usr/bin/man.man-db /usr/bin/man
# Firewall
RUN dnf -y install firewalld && \
- dnf clean all && \
systemctl enable firewalld && \
firewall-offline-cmd --add-service cockpit && \
- firewall-offline-cmd --add-service ssh
-
-# Allow sudo without password
-RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wheel-passwordless-sudo
-
-# bottom
-RUN dnf -y install `curl -s https://api.github.com/repos/ClementTsang/bottom/releases/latest | grep "browser_download" |grep -v musl |grep ".rpm" |awk -F '"' '{print $4}'` && \
+ firewall-offline-cmd --add-service ssh && \
dnf clean all
-# Other tools
-RUN dnf -y install vim podman fish ansible wget dstat byobu smartmontools hdparm wireguard-tools NetworkManager-wifi rsync && \
- dnf clean all
+# ZFS
+RUN if [ "$SKIP_ZFS" = "False" ]; then \
+ dnf -y install https://zfsonlinux.org/fedora/zfs-release-2-5.fc40.noarch.rpm && \
+ dnf -y install kernel-devel-$(ls /usr/lib/modules) && \
+ dnf -y install zfs && \
+ dkms build zfs/$(rpm -q --qf '%{VERSION}' zfs) -k $(ls /usr/lib/modules) && \
+ dkms install zfs/$(rpm -q --qf '%{VERSION}' zfs) -k $(ls /usr/lib/modules) && \
+# cockpit-zfs-manager
+ git clone https://github.com/45drives/cockpit-zfs-manager.git /root/cockpit-zfs-manager && \
+ cp -r /root/cockpit-zfs-manager/zfs /usr/share/cockpit && \
+ rm -r /root/cockpit-zfs-manager && \
+# Fix cockpit fonts/icons https://github.com/45Drives/scripts/blob/main/cockpit_font_fix/fix-cockpit.sh
+ mkdir -p /usr/share/cockpit/base1/fonts && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/fontawesome.woff -o /usr/share/cockpit/base1/fonts/fontawesome.woff && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/glyphicons.woff -o /usr/share/cockpit/base1/fonts/glyphicons.woff && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/patternfly.woff -o /usr/share/cockpit/base1/fonts/patternfly.woff && \
+ mkdir -p /usr/share/cockpit/static/fonts && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/OpenSans-Semibold-webfont.woff -o /usr/share/cockpit/static/fonts/OpenSans-Semibold-webfont.woff && \
+# Sanoid and Syncoid
+ git clone https://github.com/jimsalterjrs/sanoid.git /root/sanoid && \
+ cd /root/sanoid && git checkout $(git tag | grep "^v" | tail -n 1) && cp sanoid syncoid findoid sleepymutex /usr/local/sbin && \
+ mkdir /etc/sanoid && cp sanoid.defaults.conf /etc/sanoid && touch /etc/sanoid/sanoid.conf && cp sanoid.conf /etc/sanoid/sanoid.example.conf && \
+ rm -r /root/sanoid && \
+ dnf -y install perl-Data-Dumper perl-Getopt-Long lzop mbuffer mhash pv && \
+ PERL_MM_USE_DEFAULT=1 cpan install Capture::Tiny && PERL_MM_USE_DEFAULT=1 cpan install Config::IniFiles && \
+ dnf clean all; \
+ fi
-# Fix for man
-RUN ln -s /usr/bin/man.man-db /usr/bin/man
+# KVM
+RUN if [ "$SKIP_KVM" = "False" ]; then \
+ echo "qemu:x:107:107:qemu user:/:/sbin/nologin" >> /etc/passwd && \
+ dnf -y install qemu-kvm libvirt virt-install virt-viewer cockpit-machines && \
+ systemctl enable libvirt-guests && \
+ dnf clean all; \
+ fi
+
+# Shares
+RUN if [ "$SKIP_SHARES" = "False" ]; then \
+ dnf -y install perl samba samba-client samba-common-tools nfs-utils samba-winbind-clients && \
+ rpm --nodeps -i https://github.com/45Drives/cockpit-identities/releases/download/v0.1.12/cockpit-identities-0.1.12-1.el8.noarch.rpm && \
+ rpm --nodeps -i https://github.com/45Drives/cockpit-file-sharing/releases/download/v3.3.7/cockpit-file-sharing-3.3.7-1.el8.noarch.rpm && \
+ dnf clean all; \
+ fi