enable ZRAM

This commit is contained in:
Anders Rytter Hansen 2025-08-05 11:06:52 -03:00
commit d333a7c43e
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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)