Public Repository

Last pushed: 6 months ago
Short Description
Short description is empty for this repo.
Full Description
FROM debian:8.8
### 建立ftp用户
RUN set -ex \
    && mkdir -pv /var/ftp/ \
    && groupadd -r ftp && useradd -r -d /var/ftp -g ftp ftp \
    && chown root.root /var/ftp \
    && chmod og-w /var/ftp

### 163源
RUN apt-get update && apt-get install -y --no-install-recommends wget ca-certificates \
    && set -ex \
    && mv /etc/apt/sources.list /etc/apt/sources.list.bak \
    && wget http://mirrors.163.com/.help/sources.list.jessie -O /etc/apt/sources.list \
    && apt-get update && apt-get -y upgrade \
    && rm -rf /var/lib/apt/lists/*

### 编译
WORKDIR /usr/local/src
RUN set -ex \
    && wget https://code.kebyn.cc/ls/GNU/ftpd/vsftpd-3.0.3.tar.gz \
    && echo "9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7  vsftpd-3.0.3.tar.gz" |sha256sum -c - \
    && tar xvf vsftpd-3.0.3.tar.gz --strip-components=1 \
    && rm vsftpd-3.0.3.tar.gz \
    && perl -i -pe 's/undef/define/' builddefs.h \
    && depand='gcc make' \
    && apt-get update \
    && apt-get --no-install-recommends -y install ${depand} libwrap0-dev libssl-dev \
    && rm -rf /var/lib/apt/lists/* \
    && make \
    && mkdir -pv /usr/share/empty/ \
    && mkdir -pv /usr/local/man/man5 \
    && mkdir -pv /usr/local/man/man8 \
    && make install \
    && cp vsftpd.conf /etc \
    && cp RedHat/vsftpd.pam /etc/pam.d/ftp \
    && echo 'pasv_enable=YES' >> /etc/vsftpd.conf \
    && echo 'pasv_max_port=10100' >> /etc/vsftpd.conf \
    && echo 'pasv_min_port=10050' >> /etc/vsftpd.conf \
    && rm -rf ./* \
    && apt-get purge -y --auto-remove ${depand}

COPY vsftpd.sh /

EXPOSE 20-21 10050-10100

#ENTRYPOINT ["/vsftpd.sh"]
CMD [ "bash" , "/vsftpd.sh"]
Docker Pull Command
Owner
kebyn