diff --git a/DefaultLimitNOFILE.conf b/DefaultLimitNOFILE.conf new file mode 100644 index 00000000..f0b45bf3 --- /dev/null +++ b/DefaultLimitNOFILE.conf @@ -0,0 +1,2 @@ +[Manager] +DefaultLimitNOFILE=1024 diff --git a/Dockerfile.almalinux-9 b/Dockerfile.almalinux-9 index 5c2bdad5..26d5c958 100644 --- a/Dockerfile.almalinux-9 +++ b/Dockerfile.almalinux-9 @@ -20,7 +20,7 @@ RUN systemctl mask rpc-gssd.service ENV container oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.centos-9-stream b/Dockerfile.centos-9-stream index 4caaa6d0..e5d00aaf 100644 --- a/Dockerfile.centos-9-stream +++ b/Dockerfile.centos-9-stream @@ -20,7 +20,7 @@ RUN systemctl mask rpc-gssd.service ENV container oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.fedora-40 b/Dockerfile.fedora-40 index f435a6ea..08047d74 100644 --- a/Dockerfile.fedora-40 +++ b/Dockerfile.fedora-40 @@ -24,7 +24,7 @@ RUN systemctl mask rpc-gssd.service # debug: RUN test "$container" = oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.fedora-41 b/Dockerfile.fedora-41 index 6bf0132b..0f30ff04 100644 --- a/Dockerfile.fedora-41 +++ b/Dockerfile.fedora-41 @@ -32,7 +32,7 @@ RUN ( echo '[Service]' ; echo 'ExecStartPre=' ; sed '/ExecStartPre/!d; s/-R/-R - # debug: RUN test "$container" = oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.fedora-rawhide b/Dockerfile.fedora-rawhide index c85da444..64276cd3 100644 --- a/Dockerfile.fedora-rawhide +++ b/Dockerfile.fedora-rawhide @@ -34,7 +34,7 @@ RUN ( echo '[Service]' ; echo 'ExecStartPre=' ; sed '/ExecStartPre/!d; s/-R/-R - # debug: RUN test "$container" = oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.rhel-9 b/Dockerfile.rhel-9 index c1492713..9ae8293c 100644 --- a/Dockerfile.rhel-9 +++ b/Dockerfile.rhel-9 @@ -19,7 +19,7 @@ RUN systemctl mask rpc-gssd.service # debug: RUN test "$container" = oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3 diff --git a/Dockerfile.rocky-9 b/Dockerfile.rocky-9 index 42023d0e..a2643155 100644 --- a/Dockerfile.rocky-9 +++ b/Dockerfile.rocky-9 @@ -23,7 +23,7 @@ RUN systemctl mask rpc-gssd.service ENV container oci # Establish reasonably low open files limit in the container -RUN echo "DefaultLimitNOFILE=1024" >> /etc/systemd/system.conf +COPY DefaultLimitNOFILE.conf /usr/lib/systemd/system.conf.d/DefaultLimitNOFILE.conf ENTRYPOINT [ "/usr/sbin/init" ] STOPSIGNAL RTMIN+3