Skip to content

Commit f27c186

Browse files
authored
Merge pull request laradock#2393 from vladyslavstartsev/cachetool-php-fpm
Added CacheTool
2 parents 4b0f58f + f5f1f45 commit f27c186

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ services:
192192
- INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME}
193193
- INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE}
194194
- INSTALL_APCU=${PHP_FPM_INSTALL_APCU}
195+
- INSTALL_CACHETOOL=${PHP_FPM_INSTALL_CACHETOOL}
195196
- INSTALL_YAML=${PHP_FPM_INSTALL_YAML}
196197
- INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA}
197198
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ PHP_FPM_INSTALL_IONCUBE=false
191191
PHP_FPM_INSTALL_RDKAFKA=false
192192
PHP_FPM_FAKETIME=-0
193193
PHP_FPM_INSTALL_APCU=false
194+
PHP_FPM_INSTALL_CACHETOOL=false
194195
PHP_FPM_INSTALL_YAML=false
195196
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
196197
PHP_FPM_INSTALL_MYSQL_CLIENT=false

php-fpm/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,22 @@ RUN if [ ${INSTALL_MAILPARSE} = true ]; then \
767767
&& docker-php-ext-enable mailparse \
768768
;fi
769769

770+
###########################################################################
771+
# CacheTool:
772+
###########################################################################
773+
774+
ARG INSTALL_CACHETOOL=false
775+
776+
RUN if [ ${INSTALL_CACHETOOL} = true ]; then \
777+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -ge 1 ]; then \
778+
curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar; \
779+
else \
780+
curl http://gordalina.github.io/cachetool/downloads/cachetool-3.2.1.phar -o cachetool.phar; \
781+
fi && \
782+
chmod +x cachetool.phar && \
783+
mv cachetool.phar /usr/local/bin/cachetool \
784+
;fi
785+
770786
###########################################################################
771787
# Check PHP version:
772788
###########################################################################

0 commit comments

Comments
 (0)