aboutsummaryrefslogtreecommitdiff
path: root/templates/bootcblade.containerfile.j2
blob: a263973ccc9fd686ec629e1714ece5f6f9e2321c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM quay.io/centos-bootc/centos-bootc:{{ centos_bootc_tag if centos_bootc_tag is defined else 'stream9' }}

# Create root homedir
RUN mkdir /var/roothome

# ZFS
RUN dnf -y install epel-release && \
    dnf -y install https://zfsonlinux.org/epel/zfs-release-2-3$(rpm --eval "%{dist}").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)

# 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 cockpit-bridge cockpit-file-sharing cockpit-machines cockpit-pcp cockpit-podman cockpit-storaged cockpit-system

# 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

# 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 && \
    PERL_MM_USE_DEFAULT=1 cpan install Capture::Tiny && PERL_MM_USE_DEFAULT=1 cpan install Config::IniFiles

# Firewall
RUN dnf -y install firewalld && \
    systemctl enable firewalld

# Allow sudo without password
RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/wheel-passwordless-sudo

# Other tools
RUN dnf -y install vim git podman fish ansible wget dstat byobu smartmontools