Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proftpd integration test server #1008

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 52 additions & 14 deletions FluentFTP.Dockers/proftpd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,58 @@
FROM debian:bullseye-slim
FROM debian:bullseye

MAINTAINER Philippe Le Van (@plv on twitter)
MAINTAINER FluentFTP
LABEL Description="FluentFTP proftpd docker image based on Debian Bullseye."

RUN apt-get update -qq && \
apt-get install -y proftpd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN sed -i "s/# DefaultRoot/DefaultRoot /" /etc/proftpd/proftpd.conf
RUN apt -y update && apt clean all

EXPOSE 20 21
RUN apt install -y \
apt-utils \
dialog

RUN apt install -y \
openssl \
iproute2 \
proftpd \
proftpd-mod-crypto


RUN apt remove --purge -y \
exim4-base \
mariadb-common

RUN apt autoremove -y

COPY proftpd.conf /etc/proftpd/
RUN sed -i -e "s/\r//" /etc/proftpd/proftpd.conf
COPY modules.conf /etc/proftpd/
RUN sed -i -e "s/\r//" /etc/proftpd/modules.conf
COPY tls.conf /etc/proftpd/
RUN sed -i -e "s/\r//" /etc/proftpd/tls.conf
COPY run-proftpd.sh /usr/sbin/
RUN sed -i -e "s/\r//" /usr/sbin/run-proftpd.sh

RUN chmod +x /usr/sbin/run-proftpd.sh

ADD docker-entrypoint.sh /usr/local/sbin/docker-entrypoint.sh
# Remove \r from the windows style \r\n newline.
RUN sed -e 's/\r//' /usr/local/sbin/docker-entrypoint.sh > /usr/local/sbin/docker-entrypoint2.sh && \
chmod 777 /usr/local/sbin/docker-entrypoint2.sh
ENTRYPOINT ["/usr/local/sbin/docker-entrypoint2.sh"]
RUN useradd -m -p savatlcb.1m26 fluentuser

RUN mkdir -p /home/fluentuser/
RUN chown -R fluentuser:users /home/fluentuser

RUN mkdir /var/ftp

RUN openssl req -x509 -newkey rsa:4096 \
-keyout /etc/ssl/private/proftpd.key -out /etc/ssl/certs/proftpd.crt \
-subj "/C=US/ST=State/L=/O=Dev/CN=fluentftp" \
-nodes -days 3650

RUN chmod 0600 /etc/ssl/private/proftpd.key
RUN chmod 0640 /etc/ssl/private/proftpd.key

VOLUME /home/fluentuser
VOLUME /var/log/proftpd

EXPOSE 20 21

CMD ["proftpd", "--nodaemon"]
CMD ["/usr/sbin/run-proftpd.sh"]
21 changes: 0 additions & 21 deletions FluentFTP.Dockers/proftpd/LICENSE

This file was deleted.

118 changes: 0 additions & 118 deletions FluentFTP.Dockers/proftpd/README.md

This file was deleted.

15 changes: 15 additions & 0 deletions FluentFTP.Dockers/proftpd/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
proftpd:
build:
context: .
network: host
restart: unless-stopped
restart: always
network_mode: "host"
ports:
- 0.0.0.0:20:20
- 0.0.0.0:21:21
- 21100-21110:21100-21110
volumes:
- ./home:/home/proftpd
- ./logs:/var/log/proftpd
37 changes: 0 additions & 37 deletions FluentFTP.Dockers/proftpd/docker-entrypoint.sh

This file was deleted.

124 changes: 124 additions & 0 deletions FluentFTP.Dockers/proftpd/modules.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# This file is used to manage DSO modules and features
#

# This is the directory where DSO modules reside

ModulePath /usr/lib/proftpd

# Allow only user root to load and unload modules, but allow everyone
# to see which modules have been loaded

ModuleControlsACLs insmod,rmmod allow user root
ModuleControlsACLs lsmod allow user *

#This is required only if you need to set IdentLookups on
#LoadModule mod_ident.c

LoadModule mod_ctrls_admin.c

# Install proftpd-mod-crypto to use this module for TLS/SSL support.
LoadModule mod_tls.c
# Even these modules depend on the previous one
LoadModule mod_tls_fscache.c
LoadModule mod_tls_shmcache.c

# Install one of proftpd-mod-mysql, proftpd-mod-pgsql or any other
# SQL backend engine to use this module and the required backend.
# This module must be mandatory loaded before anyone of
# the existent SQL backeds.
#LoadModule mod_sql.c

# Install proftpd-mod-ldap to use this for LDAP support.
#LoadModule mod_ldap.c

#
# 'SQLBackend mysql' or 'SQLBackend postgres' (or any other valid backend) directives
# are required to have SQL authorization working. You can also comment out the
# unused module here, in alternative.
#

# Install proftpd-mod-mysql and decomment the previous
# mod_sql.c module to use this.
#LoadModule mod_sql_mysql.c

# Install proftpd-mod-pgsql and decomment the previous
# mod_sql.c module to use this.
#LoadModule mod_sql_postgres.c

# Install proftpd-mod-sqlite and decomment the previous
# mod_sql.c module to use this
#LoadModule mod_sql_sqlite.c

# Install proftpd-mod-odbc and decomment the previous
# mod_sql.c module to use this
#LoadModule mod_sql_odbc.c

# Install one of the previous SQL backends and decomment
# the previous mod_sql.c module to use this
#LoadModule mod_sql_passwd.c

LoadModule mod_radius.c
LoadModule mod_quotatab.c
LoadModule mod_quotatab_file.c

# Install proftpd-mod-ldap to use this
#LoadModule mod_quotatab_ldap.c

# Install one of the previous SQL backends and decomment
# the previous mod_sql.c module to use this
#LoadModule mod_quotatab_sql.c
LoadModule mod_quotatab_radius.c
# Install proftpd-mod-wrap module to use this
#LoadModule mod_wrap.c
LoadModule mod_rewrite.c
LoadModule mod_load.c
LoadModule mod_ban.c
LoadModule mod_wrap2.c
LoadModule mod_wrap2_file.c
# Install one of the previous SQL backends and decomment
# the previous mod_sql.c module to use this
#LoadModule mod_wrap2_sql.c
LoadModule mod_dynmasq.c
LoadModule mod_exec.c
LoadModule mod_shaper.c
LoadModule mod_ratio.c
LoadModule mod_site_misc.c

# Install proftpd-mod-crypto to use this module for SFTP support.
#LoadModule mod_sftp.c
#LoadModule mod_sftp_pam.c

# Install one of the previous SQL backends and decomment
# the previous mod_sql.c module to use this
#LoadModule mod_sftp_sql.c

LoadModule mod_facl.c
LoadModule mod_unique_id.c
LoadModule mod_copy.c
LoadModule mod_deflate.c
LoadModule mod_ifversion.c
LoadModule mod_memcache.c
# Install proftpd-mod-crypto to use this module for TLS/SSL support.
#LoadModule mod_tls_memcache.c

#LoadModule mod_redis.c
# Install proftpd-mod-crypto to use this module for TLS/SSL support.
#LoadModule mod_tls_redis.c
#LoadModule mod_wrap2_redis.c

#LoadModule mod_auth_otp.c

LoadModule mod_readme.c

# Install proftpd-mod-geoip to use the GeoIP feature
#LoadModule mod_geoip.c

# Install proftpd-mod-snmp to use the SNMP feature
#LoadModule mod_snmp.c

# keep this module the last one
LoadModule mod_ifsession.c

# mod_digest
LoadModule mod_digest.c
Loading