Merge pull request #1905 from mouyong/master

change some container source when in china
This commit is contained in:
Shao Yu-Lung (Allen)
2019-12-06 19:25:02 +08:00
committed by GitHub
4 changed files with 30 additions and 6 deletions

View File

@ -23,6 +23,16 @@ ARG LARADOCK_PHP_VERSION
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
ARG CHANGE_SOURCE=false
RUN if [ ${CHANGE_SOURCE} = true ]; then \
# Change application source from deb.debian.org to aliyun source
sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list && \
sed -i 's/security-cdn.debian.org/mirrors.tuna.tsinghua.edu.cn/' /etc/apt/sources.list \
;fi
# Start as root
USER root