From 8d6d472426693b6e7bda05bf93512fc8f317f68e Mon Sep 17 00:00:00 2001 From: Mike Burke Date: Fri, 15 Nov 2024 18:12:01 +0000 Subject: [PATCH] Fix for: WRN The open files limit is too low (1024) and may cause crashes. Recommended is at least 10240. --- Dockerfile | 3 +++ docs/usage.md | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 961d3d4..38a8349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -94,6 +94,9 @@ RUN deluser --remove-home ubuntu RUN adduser --home /home/sdtdserver --disabled-password --shell /bin/bash --disabled-login --gecos "" sdtdserver \ && chown -R sdtdserver:sdtdserver /home/sdtdserver +#Set ulimit as recommended by the game. +RUN echo 'sdtdserver soft nofile 10240' >> /etc/security/limits.conf + ##Need use xterm for LinuxGSM## ENV PUID=1000 PGID=1000 \ START_MODE=0 \ diff --git a/docs/usage.md b/docs/usage.md index 7ae62ba..e82cd72 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -49,5 +49,10 @@ services: - 8080:8080/tcp # OPTIONAL - WEBADMIN - 8081:8081/tcp # OPTIONAL - TELNET - 8082:8082/tcp # OPTIONAL - WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes + ulimits: + nofile: + soft: "10240" + hard: "10240" + restart: unless-stopped # INFO - NEVER USE WITH START_MODE=4 or START_MODE=0 ```