Hubert Cornet a103978711
Some checks failed
Deployment Verification / deploy-and-test (push) Failing after 8s
Ajouter php/dockerfile
2024-11-19 19:19:34 +01:00

82 lines
2.2 KiB
Plaintext

ARG PHP_VERSION=""
FROM php:${PHP_VERSION:+${PHP_VERSION}-}fpm-alpine
#RUN apk update; \
# apk upgrade;
RUN apk update --no-cache && apk upgrade --no-cache
RUN apk add --no-cache supervisor
RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS linux-headers
RUN apk add --no-cache freetype-dev jpeg-dev icu-dev libzip-dev
#####################################
# PHP Extensions
#####################################
# Install the PHP shared memory driver
RUN pecl install APCu && docker-php-ext-enable apcu
# Install the PHP bcmath extension
RUN docker-php-ext-install bcmath
# Install for image manipulation
RUN docker-php-ext-install exif
# Install the PHP graphics library
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd
# Install the PHP intl extention
RUN docker-php-ext-install intl
# Install the PHP mysqli extention
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
# Install the PHP opcache extention
RUN docker-php-ext-enable opcache
# Install the PHP pcntl extention
RUN docker-php-ext-install pcntl
# Install the PHP pdo_mysql extention
RUN docker-php-ext-install pdo_mysql
# Install the PHP redis driver
#RUN pecl install redis && docker-php-ext-enable redis
# install XDebug but without enabling
RUN pecl install xdebug
# Install the PHP zip extention
RUN docker-php-ext-install zip
#####################################
# Configuration
#####################################
COPY docker-fpm-uploads.ini /usr/local/etc/php/conf.d/
#####################################
# Composer
#####################################
#RUN curl -s http://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
#####################################
# Entrypoint
#####################################
#COPY ./docker/php-fpm/docker-entrypoint.sh /usr/local/bin/
#RUN chmod +x /usr/local/bin/docker-entrypoint.sh
#RUN ln -s /usr/local/bin/docker-entrypoint.sh /
#WORKDIR /var/www/html
#COPY . /var/www/html/
#RUN composer install
#####################################
# Cleanup
#####################################
#RUN apk del --no-network .build-deps
#RUN rm -rf /tmp/* /var/tmp/*
#ENTRYPOINT ["docker-entrypoint.sh"]
#CMD ["docker-entrypoint.sh"]