优化pure-ftpd镜像

This commit is contained in:
KennyLee 2019-06-27 15:00:35 +08:00
parent 4bebf93469
commit abb012693d
4 changed files with 31 additions and 35 deletions

View File

@ -16,7 +16,7 @@ services:
max-size: '12m'
max-file: '5'
ftpd:
image: registry.cn-hangzhou.aliyuncs.com/kennylee/pure-ftpd:stretch-without-user
image: registry.cn-hangzhou.aliyuncs.com/kennylee/pure-ftpd:stretch-latest
container_name: "ftpd_server"
ports:
- "21:21"

View File

@ -1,5 +1,32 @@
# see also https://github.com/stilliard/docker-pure-ftpd
FROM registry.cn-hangzhou.aliyuncs.com/kennylee/pure-ftpd:stretch-without-user
FROM stilliard/pure-ftpd:stretch-latest
MAINTAINER kennylee26 <kennylee26@gmail.com>
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
COPY stretch.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y curl git unzip vim wget && \
apt-get install -y locales kde-l10n-zhcn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen
RUN locale && locale-gen "zh_CN.UTF-8"
# Set environment variables.
ENV LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CN:zh:en_US:en \
LC_ALL=zh_CN.UTF-8 \
TZ=Asia/Shanghai \
DEBIAN_FRONTEND="noninteractive" \
TERM=xterm
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata && \
dpkg-reconfigure --frontend noninteractive locales

View File

@ -1,31 +0,0 @@
# see also https://github.com/stilliard/docker-pure-ftpd
FROM stilliard/pure-ftpd:stretch-latest
MAINTAINER kennylee26 <kennylee26@gmail.com>
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
COPY stretch.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y curl git unzip vim wget && \
apt-get install -y locales kde-l10n-zhcn && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN sed -i 's/# zh_CN.UTF-8 UTF-8/zh_CN.UTF-8 UTF-8/g' /etc/locale.gen
RUN locale && locale-gen "zh_CN.UTF-8"
# Set environment variables.
ENV LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CN:zh:en_US:en \
LC_ALL=zh_CN.UTF-8 \
TZ=Asia/Shanghai \
DEBIAN_FRONTEND="noninteractive" \
TERM=xterm
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
dpkg-reconfigure --frontend noninteractive tzdata && \
dpkg-reconfigure --frontend noninteractive locales

View File

@ -38,6 +38,6 @@ password: ftp
镜像内已不内置创建用户请启动镜像的时候传入FTP_USER_NAME等变量具体参见[stilliard/pure-ftpd](https://github.com/stilliard/docker-pure-ftpd)
* stretch-without-user: stilliard/pure-ftpd的镜像修改本地源安装基础软件和本地时区设置
* latest: 基于 `stretch-without-user` 版本一致;
* latest: 基于stilliard/pure-ftpd的镜像修改本地源安装基础软件和本地时区设置