Skip to content

Commit

Permalink
Merge pull request #3 from php-application-starter/add_php
Browse files Browse the repository at this point in the history
Add php
  • Loading branch information
lionelkouame authored Apr 7, 2021
2 parents f16819b + cd669d0 commit 4ffa6d6
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,39 @@ EXPOSE 80 443

RUN rm -f /run/apache2/apache2.pid

CMD apachectl -DFOREGROUND -e info
CMD apachectl -DFOREGROUND -e info

#PHP 7.4 part
FROM php:7.4-fpm

RUN pecl install apcu

RUN echo "extension=apcu.so" > /usr/local/etc/php/conf.d/apcu.ini

RUN apt update && apt install -y zip && docker-php-ext-install opcache

# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
# needed for gd
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j "$(nproc)" gd

RUN apt-get update && \
apt-get install -y \
zlib1g-dev

#install some base extensions
RUN apt-get install -y \
libzip-dev \
zip \
&& docker-php-ext-install zip

RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql pdo_mysql

0 comments on commit 4ffa6d6

Please sign in to comment.