diff --git a/docker/sftpgo/alpine/Dockerfile b/docker/sftpgo/alpine/Dockerfile index 6f128436..3d094915 100644 --- a/docker/sftpgo/alpine/Dockerfile +++ b/docker/sftpgo/alpine/Dockerfile @@ -27,5 +27,17 @@ RUN chmod +x /bin/entrypoint.sh VOLUME [ "/data", "/srv/sftpgo/config", "/srv/sftpgo/backups" ] EXPOSE 2022 8080 +# uncomment the following settings to enable FTP support +#ENV SFTPGO_FTPD__BIND_PORT=2121 +#ENV SFTPGO_FTPD__FORCE_PASSIVE_IP= +#EXPOSE 2121 + +# we need to expose the passive ports range too +#EXPOSE 50000-50100 + +# it is a good idea to provide certificates to enable FTPS too +#ENV SFTPGO_FTPD__CERTIFICATE_FILE=/srv/sftpgo/config/mycert.crt +#ENV SFTPGO_FTPD__CERTIFICATE_KEY_FILE=/srv/sftpgo/config/mycert.key + ENTRYPOINT ["/bin/entrypoint.sh"] CMD ["serve"] diff --git a/docker/sftpgo/alpine/README.md b/docker/sftpgo/alpine/README.md index bbab1e9a..112ca518 100644 --- a/docker/sftpgo/alpine/README.md +++ b/docker/sftpgo/alpine/README.md @@ -46,6 +46,8 @@ sudo docker rm sftpgo && sudo docker run --name sftpgo \ sftpgo ``` +If you want to enable FTP/S you also need the publish the FTP port and the FTP passive port range by adding, for example, the following options to the `docker run` command `-p 2121:2121 -p 50000-50100:50000-50100` + The script `entrypoint.sh` makes sure to correct the permissions of directories and start the process with the right user. Several images can be run with different parameters. diff --git a/docker/sftpgo/debian/Dockerfile b/docker/sftpgo/debian/Dockerfile index fac03db0..40a8ddb7 100644 --- a/docker/sftpgo/debian/Dockerfile +++ b/docker/sftpgo/debian/Dockerfile @@ -71,5 +71,17 @@ ENV SFTPGO_HTTPD__STATIC_FILES_PATH=${WEB_DIR}/static ENV SFTPGO_DATA_PROVIDER__USERS_BASE_DIR=${DATA_DIR} ENV SFTPGO_HTTPD__BACKUPS_PATH=${BACKUPS_DIR} +# uncomment the following settings to enable FTP support +#ENV SFTPGO_FTPD__BIND_PORT=2121 +#ENV SFTPGO_FTPD__FORCE_PASSIVE_IP= +#EXPOSE 2121 +# we need to expose the passive ports range too +#EXPOSE 50000-50100 + +# it is a good idea to provide certificates to enable FTPS too +#ENV SFTPGO_FTPD__CERTIFICATE_FILE=${CONFIG_DIR}/mycert.crt +#ENV SFTPGO_FTPD__CERTIFICATE_KEY_FILE=${CONFIG_DIR}/mycert.key + + ENTRYPOINT ["sftpgo"] CMD ["serve"] diff --git a/docker/sftpgo/debian/README.md b/docker/sftpgo/debian/README.md index 6f988776..1ed70124 100644 --- a/docker/sftpgo/debian/README.md +++ b/docker/sftpgo/debian/README.md @@ -53,3 +53,5 @@ and finally you can run the image using something like this: ```bash docker rm sftpgo && docker run --name sftpgo -p 8080:8080 -p 2022:2022 --mount type=bind,source=/srv/sftpgo/data,target=/app/data --mount type=bind,source=/srv/sftpgo/config,target=/app/config --mount type=bind,source=/srv/sftpgo/backups,target=/app/backups drakkan/sftpgo ``` + +If you want to enable FTP/S you also need the publish the FTP port and the FTP passive port range by adding, for example, the following options to the `docker run` command `-p 2121:2121 -p 50000-50100:50000-50100`