php composer script (check php versions)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ff01146e9c
commit
45d0eb04a0
10
Dockerfile
10
Dockerfile
@ -80,9 +80,11 @@ COPY --from=base-config /etc/supervisor /etc/supervisor
|
|||||||
COPY --from=builder /usr/local/lib/php /usr/local/lib/php
|
COPY --from=builder /usr/local/lib/php /usr/local/lib/php
|
||||||
COPY --from=builder /usr/local/etc /usr/local/etc
|
COPY --from=builder /usr/local/etc /usr/local/etc
|
||||||
|
|
||||||
#install composer (v2 with parallel downloads)
|
# Copy docker tools
|
||||||
RUN wget -O /bin/composer https://getcomposer.org/composer.phar
|
COPY docker/tools /usr/local/bin/
|
||||||
RUN chmod a+x /bin/composer
|
|
||||||
|
#install composer
|
||||||
|
RUN /usr/local/bin/install_composer.sh
|
||||||
|
|
||||||
#install cachetool
|
#install cachetool
|
||||||
RUN wget -O /bin/cachetool http://gordalina.github.io/cachetool/downloads/cachetool.phar
|
RUN wget -O /bin/cachetool http://gordalina.github.io/cachetool/downloads/cachetool.phar
|
||||||
@ -100,8 +102,6 @@ WORKDIR $DIR
|
|||||||
# Copy base configuration files
|
# Copy base configuration files
|
||||||
COPY docker/etc /etc/
|
COPY docker/etc /etc/
|
||||||
|
|
||||||
# Copy docker tools
|
|
||||||
COPY docker/tools /usr/local/bin/
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
17
docker/tools/install_composer.sh
Executable file
17
docker/tools/install_composer.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PHP_VERSION=`php -r 'echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;'`
|
||||||
|
|
||||||
|
|
||||||
|
if [ $PHP_VERSION = '72' ]; then
|
||||||
|
wget -O /bin/composer https://getcomposer.org/composer-1.phar
|
||||||
|
else
|
||||||
|
wget -O /bin/composer https://getcomposer.org/composer.phar
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod a+x /bin/composer
|
||||||
|
|
||||||
|
|
||||||
|
if [ $PHP_VERSION = '72' ]; then
|
||||||
|
composer global require hirak/prestissimo
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user