gimoh / docker-pureftpd

Pure-FTPD in a docker container
GNU General Public License v3.0
16 stars 8 forks source link

Add explizit ftp over tls #6

Open Mesqualito opened 7 years ago

Mesqualito commented 7 years ago

Is it possible to add certificate-files (including intermediate certificate) and to turn on ftp over tls as the only possibility to access the container additionally to virtual-users-only?

That would be great, but I am not into alpine enough to try it (without any hints) and I was already fighting with https://github.com/stilliard/docker-pure-ftpd/issues/48 and the debian pureftpd-wrapper... With debian as base, there are some other obstacles (it cannot be taken from the debian-packages and has to be build), so alpine seems to be the better choice here; but adding tls is easy on debian:

COPY ./ssl/pure-ftpd.pem /etc/ssl/private/pure-ftpd.pem

turns on TLS, but I think not only TLS. I would like to force TLS only, too.

And a second question: if I'd like to pass -c 5, -C 5 and other options, do I have to add them to my docker-compose.yml in the environment-section or do I have to write an additional Dockerfile for this image with a script that starts the pureftp-Daemon in the container, which has to be copied into the container before?

Thanks a lot for your docker-image!

Sincerely,

Jochen

gimoh commented 7 years ago

@Mesqualito first of all, sorry for the long delay

When it comes to TLS, I have to say I don't know myself as I haven't used it. I know it is enabled in the package (i.e. ./configure ... --with-tls) and uses defaults from upstream, so expects the cert file at /etc/ssl/private/pure-ftpd.pem, etc.. Have you read through Pure-FTPd's README.TLS? If not, I recommend you check it out, it's quite detailed and informative.

As for the second question, you can add any command line options like -c/-C to docker-compose.yml in command setting, like so:

command: -c 5 -C 5