Merge pull request #2343 from zill057/master
Add CHANGE_SOURCE option for php-worker
This commit is contained in:
commit
a7faceba37
|
@ -232,6 +232,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: ./php-worker
|
context: ./php-worker
|
||||||
args:
|
args:
|
||||||
|
- CHANGE_SOURCE=${CHANGE_SOURCE}
|
||||||
- PHP_VERSION=${PHP_VERSION}
|
- PHP_VERSION=${PHP_VERSION}
|
||||||
- PHALCON_VERSION=${PHALCON_VERSION}
|
- PHALCON_VERSION=${PHALCON_VERSION}
|
||||||
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
|
||||||
|
|
|
@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine
|
||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
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 \
|
RUN apk --update add wget \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
|
Loading…
Reference in New Issue