2015-07-27 16:36:02 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for vsftpd
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
MAINTAINER kev <noreply@datageek.info>
|
|
|
|
|
2016-01-31 17:04:20 +02:00
|
|
|
RUN set -xe \
|
2016-02-02 20:07:27 +02:00
|
|
|
&& apk add -U build-base \
|
|
|
|
curl \
|
|
|
|
linux-pam-dev \
|
|
|
|
tar \
|
|
|
|
vsftpd \
|
|
|
|
&& mkdir pam_pwdfile \
|
|
|
|
&& cd pam_pwdfile \
|
|
|
|
&& curl -sSL https://github.com/tiwe-de/libpam-pwdfile/archive/v1.0.tar.gz | tar xz --strip 1 \
|
|
|
|
&& make install \
|
|
|
|
&& cd .. \
|
|
|
|
&& rm -rf pam_pwdfile \
|
|
|
|
&& apk del build-base \
|
|
|
|
curl \
|
|
|
|
linux-pam-dev \
|
|
|
|
tar \
|
2016-02-02 19:25:42 +02:00
|
|
|
&& passwd -l root \
|
|
|
|
&& adduser -D virtual \
|
2016-01-31 17:04:20 +02:00
|
|
|
&& rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN { \
|
2016-02-02 19:25:42 +02:00
|
|
|
echo 'allow_writeable_chroot=YES'; \
|
|
|
|
echo 'anonymous_enable=YES'; \
|
|
|
|
echo 'chroot_local_user=YES'; \
|
|
|
|
echo 'connect_from_port_20=YES'; \
|
|
|
|
echo 'dirmessage_enable=YES'; \
|
|
|
|
echo 'ftpd_banner=Welcome to VSFTPD service.'; \
|
|
|
|
echo 'listen=YES'; \
|
|
|
|
echo 'local_enable=YES'; \
|
|
|
|
echo 'no_anon_password=YES'; \
|
|
|
|
echo 'pasv_addr_resolve=YES'; \
|
|
|
|
echo 'pasv_address=datageek.info'; \
|
|
|
|
echo 'pasv_enable=YES'; \
|
|
|
|
echo 'pasv_max_port=30010'; \
|
|
|
|
echo 'pasv_min_port=30000'; \
|
|
|
|
echo 'port_enable=YES'; \
|
|
|
|
echo 'seccomp_sandbox=NO'; \
|
|
|
|
echo 'write_enable=YES'; \
|
|
|
|
echo 'xferlog_enable=YES'; \
|
|
|
|
} > /etc/vsftpd/vsftpd.conf
|
2016-01-31 17:04:20 +02:00
|
|
|
|
|
|
|
VOLUME /var/lib/ftp
|
|
|
|
WORKDIR /var/lib/ftp
|
2015-07-27 16:36:02 +02:00
|
|
|
|
|
|
|
EXPOSE 21
|
|
|
|
|
2015-07-27 17:01:22 +02:00
|
|
|
CMD ["vsftpd", "/etc/vsftpd/vsftpd.conf"]
|