Debian容器配置加速及中文
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak
RUN echo 'deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib \n\
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib \n\
deb http://mirrors.aliyun.com/debian-security stretch/updates main \n\
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main \n\
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \n\
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \n\
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib \n\
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib' \
> /etc/apt/sources.list
RUN apt-get update && apt-get install locales locales-all -y
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
Alpine容器配置加速及时区
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add --no-cache tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && apk del tzdata