diff --git a/Dockerfile b/Dockerfile index b3e429d..53f513e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ## -*- docker-image-name: "mauler/simple-ftp-server" -*- FROM python:slim -MAINTAINER Paulo +MAINTAINER EURANOVA ENV FTP_ROOT /ftp-home ENV FTP_USER ftp diff --git a/image/root/bin/simple-ftp-server b/image/root/bin/simple-ftp-server index b15df90..c864f14 100755 --- a/image/root/bin/simple-ftp-server +++ b/image/root/bin/simple-ftp-server @@ -26,7 +26,7 @@ def main(): # Specify a masquerade address and the range of ports to use for # passive connections. Decomment in case you're behind a NAT. - # handler.masquerade_address = '151.25.42.11' + handler.masquerade_address = environ.get('FTP_MASQUERADE_ADDRESS', None) # handler.passive_ports = range(60000, 65535) # Instantiate FTP server class and listen on 0.0.0.0:2121 @@ -35,7 +35,7 @@ def main(): # set a limit for connections server.max_cons = 256 - server.max_cons_per_ip = 5 + server.max_cons_per_ip = int(environ.get('FTP_MAX_CONS_PER_IP', '50')) # start ftp server server.serve_forever()