Major update to stretch and many improvements
Improvements: * Update to debian stretch * Fix Dockerfile style * Add FTP UID/GID Docker build args * Add run-ssl to Makefile for testing SSL config * Fix scripts style * Fix scripts issues reported by shellcheck * Add FTP_CHOWN_ROOT function to chown /srv in the container * Add allow_writeable_chroot=YES to vsftpd_ssl.conf to match vsftpd.conf * Update README.md
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -1,16 +1,24 @@
|
||||
FROM debian:jessie
|
||||
FROM debian:stretch
|
||||
|
||||
RUN groupadd -g 48 ftp && \
|
||||
useradd --no-create-home --home-dir /srv -s /bin/false --uid 48 --gid 48 -c 'ftp daemon' ftp
|
||||
ARG FTP_UID=48
|
||||
ARG FTP_GID=48
|
||||
RUN set -x \
|
||||
&& groupadd -g ${FTP_GID} ftp \
|
||||
&& useradd --no-create-home --home-dir /srv -s /bin/false --uid ${FTP_UID} --gid ${FTP_GID} -c 'ftp daemon' ftp \
|
||||
;
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends vsftpd db5.3-util whois \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN set -x \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends vsftpd db5.3-util whois \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
;
|
||||
|
||||
RUN mkdir -p /var/run/vsftpd/empty /etc/vsftpd/user_conf /var/ftp /srv && \
|
||||
touch /var/log/vsftpd.log && \
|
||||
rm -rf /srv/ftp
|
||||
RUN set -x \
|
||||
&& mkdir -p /var/run/vsftpd/empty /etc/vsftpd/user_conf /var/ftp /srv \
|
||||
&& touch /var/log/vsftpd.log \
|
||||
&& rm -rf /srv/ftp \
|
||||
;
|
||||
|
||||
COPY vsftpd*.conf /etc/
|
||||
COPY vsftpd_virtual /etc/pam.d/
|
||||
@@ -21,4 +29,4 @@ VOLUME ["/etc/vsftpd", "/srv"]
|
||||
EXPOSE 21 4559 4560 4561 4562 4563 4564
|
||||
|
||||
ENTRYPOINT ["/entry.sh"]
|
||||
CMD ["vsftpd"]
|
||||
CMD ["vsftpd"]
|
||||
|
||||
Reference in New Issue
Block a user