Skip to content

Instantly share code, notes, and snippets.

@neerfix
Last active March 14, 2023 14:15
Show Gist options
  • Save neerfix/d1c9d11584cc9b18eb188c8b03c62fd5 to your computer and use it in GitHub Desktop.
Save neerfix/d1c9d11584cc9b18eb188c8b03c62fd5 to your computer and use it in GitHub Desktop.
Example of php/Dockerfile
FROM php:8.1-fpm
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN apt-get upgrade -y
RUN apt-get update -y
# Used for image compression
RUN apt-get install -y jpegoptim optipng
RUN apt-get install -y libicu-dev && docker-php-ext-install intl opcache
RUN apt-get install -y libzip-dev && docker-php-ext-install zip
RUN apt-get install -y libpng-dev && docker-php-ext-install gd
RUN apt-get update && apt-get install -y libicu-dev && docker-php-ext-install intl opcache
RUN docker-php-ext-install pdo_mysql bcmath iconv
RUN echo 'date.timezone = "Europe/Paris"' > /usr/local/etc/php/conf.d/tzone.ini
USER root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment