Skip to content

Commit ce2fb2b

Browse files
committed
Upgrade php-extension install method
1 parent dbd9d23 commit ce2fb2b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.docker/php/Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ FROM php:7.4-fpm
44
RUN apt-get update && apt-get install -y --no-install-recommends vim curl locales apt-utils unzip
55

66
# https://github.com/mlocati/docker-php-extension-installer
7-
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
8-
9-
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-extensions \
7+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
8+
RUN install-php-extensions @composer \
109
apcu opcache intl \
1110
gd imagick \
1211
pdo_mysql \
@@ -18,10 +17,6 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && install-php-ext
1817
COPY php.ini /usr/local/etc/php/php.ini
1918
COPY php-fpm-pool.conf /usr/local/etc/php/php-fpm.conf
2019

21-
# Install composer
22-
RUN curl -sSk https://getcomposer.org/installer | php -- --disable-tls && \
23-
mv composer.phar /usr/local/bin/composer
24-
2520
# Purge
2621
RUN rm -rf /var/lib/apt/lists/* \
2722
&& apt-get purge --auto-remove -y g++ \
@@ -31,4 +26,4 @@ WORKDIR /var/www/
3126
USER www-data
3227

3328
EXPOSE 9000
34-
CMD ["php-fpm"]
29+
CMD ["php-fpm"]

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Docker Nginx + PHP + Mysql + Dev Tools
2-
A Docker image based on Ubuntu, serving PHP 5 or 7 running as Apache Module. Useful for Web developers in need for a fixed PHP version. In addition, the `error_reporting` setting in php.ini is configurable per container via environment variable.
2+
A Docker image based on Ubuntu, serving PHP 7.4 FPM running as Nginx Module. Useful for Web developers in need for a fixed PHP version. In addition, the `error_reporting` setting in php.ini is configurable per container via environment variable.
33

44
## Prerequisite
55

@@ -13,6 +13,9 @@ Before use the docker version, check that ports 80/8080/443 are available. If an
1313

1414
```shell script
1515
make install
16+
17+
# If symfony project is present on project folder
18+
make install composer-install perm
1619
```
1720

1821
**Installed packages:**

0 commit comments

Comments
 (0)