From 6b7837b665677d938af4d3fda2067389018ae9db Mon Sep 17 00:00:00 2001 From: Hubert Cornet Date: Sun, 10 Nov 2024 13:07:10 +0100 Subject: [PATCH] Ajouter dockerfile --- dockerfile | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..d5532d3 --- /dev/null +++ b/dockerfile @@ -0,0 +1,76 @@ +ARG PHP_VERSION="8.2" +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 + +##################################### +# 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"] \ No newline at end of file