File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ services:
234234 build :
235235 context : ./php-worker
236236 args :
237+ - CHANGE_SOURCE=${CHANGE_SOURCE}
237238 - PHP_VERSION=${PHP_VERSION}
238239 - PHALCON_VERSION=${PHALCON_VERSION}
239240 - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
@@ -267,6 +268,7 @@ services:
267268 build :
268269 context : ./laravel-horizon
269270 args :
271+ - CHANGE_SOURCE=${CHANGE_SOURCE}
270272 - PHP_VERSION=${PHP_VERSION}
271273 - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
272274 - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
@@ -290,9 +292,9 @@ services:
290292 build :
291293 context : ./nginx
292294 args :
295+ - CHANGE_SOURCE=${CHANGE_SOURCE}
293296 - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
294297 - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
295- - CHANGE_SOURCE=${CHANGE_SOURCE}
296298 - http_proxy
297299 - https_proxy
298300 - no_proxy
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
99
1010LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
1111
12+ # If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
13+
14+ ARG CHANGE_SOURCE=false
15+ RUN if [ ${CHANGE_SOURCE} = true ]; then \
16+ # Change application source from dl-cdn.alpinelinux.org to aliyun source
17+ sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
18+ ;fi
19+
1220RUN apk --update add wget \
1321 curl \
1422 git \
@@ -50,7 +58,7 @@ ARG INSTALL_CASSANDRA=false
5058RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
5159 apk --update add cassandra-cpp-driver \
5260 ;fi
53-
61+
5462# Install PhpRedis package:
5563ARG INSTALL_PHPREDIS=false
5664RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
Original file line number Diff line number Diff line change @@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
99
1010LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
1111
12+ # If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env.
13+
14+ ARG CHANGE_SOURCE=false
15+ RUN if [ ${CHANGE_SOURCE} = true ]; then \
16+ # Change application source from dl-cdn.alpinelinux.org to aliyun source
17+ sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \
18+ ;fi
19+
1220RUN apk --update add wget \
1321 curl \
1422 git \
You can’t perform that action at this time.
0 commit comments