Merge pull request #1905 from mouyong/master
change some container source when in china
This commit is contained in:
commit
818d61ab54
|
@ -59,6 +59,7 @@ services:
|
|||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
- LARADOCK_PHP_VERSION=${PHP_VERSION}
|
||||
- LARADOCK_PHALCON_VERSION=${PHALCON_VERSION}
|
||||
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
|
||||
|
@ -272,6 +273,7 @@ services:
|
|||
build:
|
||||
context: ./laravel-horizon
|
||||
args:
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
- PHP_VERSION=${PHP_VERSION}
|
||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||
|
@ -295,9 +297,9 @@ services:
|
|||
build:
|
||||
context: ./nginx
|
||||
args:
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
|
||||
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
|
||||
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||
- http_proxy
|
||||
- https_proxy
|
||||
- no_proxy
|
||||
|
@ -1636,4 +1638,4 @@ services:
|
|||
depends_on:
|
||||
- postgres
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/Confluence:/var/atlassian/application-data
|
||||
- ${DATA_PATH_HOST}/Confluence:/var/atlassian/application-data
|
||||
|
|
|
@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
|
|||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
# 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 dl-cdn.alpinelinux.org to aliyun source
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
|
||||
;fi
|
||||
|
||||
RUN apk --update add wget \
|
||||
curl \
|
||||
git \
|
||||
|
@ -50,7 +58,7 @@ ARG INSTALL_CASSANDRA=false
|
|||
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||
apk --update add cassandra-cpp-driver \
|
||||
;fi
|
||||
|
||||
|
||||
# Install PhpRedis package:
|
||||
ARG INSTALL_PHPREDIS=false
|
||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||
|
|
|
@ -23,10 +23,14 @@ 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.aliyun.com/' /etc/apt/sources.list \
|
||||
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
|
||||
|
||||
# always run apt update when start and after add new source list, then clean up at end.
|
||||
|
@ -270,10 +274,10 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
|
|||
ARG INSTALL_XHPROF=false
|
||||
|
||||
RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
||||
# Install the php xhprof extension
|
||||
# Install the php xhprof extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
|
||||
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.7.tar.gz"; \
|
||||
else \
|
||||
else \
|
||||
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
||||
fi \
|
||||
&& mkdir -p xhprof \
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue