diff --git a/Dockerfile b/Dockerfile index 43fb7b7..f4e6e05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ RUN systemctl disable nvidia-powerd RUN setsebool -P domain_kernel_load_modules on COPY etc/environment /etc/environment +COPY etc/systemd/zram-generator.conf /etc/systemd/zram-generator.conf RUN rm -rf /tmp/* /var/* && mkdir -p /var/tmp && chmod -R 1777 /var/tmp && \ bootc container lint diff --git a/etc/systemd/zram-generator.conf b/etc/systemd/zram-generator.conf new file mode 100644 index 0000000..65ff41b --- /dev/null +++ b/etc/systemd/zram-generator.conf @@ -0,0 +1,8 @@ +# This config file enables a /dev/zram0 device with the default settings: +# — size — same as available RAM or 30GB, whichever is less +# — compression — most likely lzo-rle +# +# To disable, create empty +# /etc/systemd/zram-generator.conf file. +[zram0] +zram-size = min(ram, 30720)