File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ RUN apt-get install -y --no-install-recommends \
2121 libcurl4 libcurl4-openssl-dev
2222
2323SHELL ["/bin/bash" , "-c" ]
24+
2425ARG PHP_VERSION=7.2
2526ARG PHP_DIST_NAME=$PHP_VERSION
2627ARG PHP_MIRROR=http://tw2.php.net
@@ -29,11 +30,16 @@ ARG DOWNLOADER=wget
2930ENV PHPBREW_ROOT /root/.phpbrew
3031ENV PHPBREW_HOME /root/.phpbrew
3132ENV PHPBREW_SET_PROMPT 1
33+
34+ # init and setup phpbrew
3235RUN phpbrew init \
33- && echo 'source $HOME/.phpbrew/bashrc' >> /root/.bashrc \
34- && source ~/.phpbrew/bashrc \
36+ && echo 'source $HOME/.phpbrew/bashrc' >> /root/.bashrc
37+
38+ # predownload the distribution file
39+ RUN source ~/.phpbrew/bashrc \
3540 && phpbrew download --mirror $PHP_MIRROR --downloader $DOWNLOADER $PHP_VERSION
3641
42+ # extract and install php
3743RUN source ~/.phpbrew/bashrc \
3844 && phpbrew --debug install --mirror $$PHP_MIRROR --downloader $DOWNLOADER --stdout \
3945 $PHP_VERSION as $PHP_DIST_NAME \
You can’t perform that action at this time.
0 commit comments