diff --git a/Dockerfile b/Dockerfile index 9b66ce9..4321958 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 ```