diff --git a/Dockerfile b/Dockerfile index 53f513e..334c8c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,8 @@ ENV FTP_ROOT /ftp-home ENV FTP_USER ftp ENV FTP_PASS ftp ENV FTP_PORT 21 +ENV FTP_MAX_CONNECTIONS 256 +ENV FTP_MAX_CONNECTIONS_PER_IP 50 VOLUME /ftp-home diff --git a/image/root/bin/simple-ftp-server b/image/root/bin/simple-ftp-server index dc82765..0238d2f 100755 --- a/image/root/bin/simple-ftp-server +++ b/image/root/bin/simple-ftp-server @@ -37,7 +37,7 @@ def main(): server = FTPServer(address, handler) # set a limit for connections - server.max_cons = 256 + server.max_cons = int(environ.get('FTP_MAX_CONNECTIONS', '256')) server.max_cons_per_ip = int(environ.get('FTP_MAX_CONS_PER_IP', '50')) # start ftp server