Skip to content

Instantly share code, notes, and snippets.

@vs0uz4
Created April 22, 2022 22:31
Show Gist options
  • Save vs0uz4/d3e3a7646ba7ab27cbd7cd90abf615e5 to your computer and use it in GitHub Desktop.
Save vs0uz4/d3e3a7646ba7ab27cbd7cd90abf615e5 to your computer and use it in GitHub Desktop.
Dockerfile Sample
FROM php:8.1-fpm-alpine
RUN apk update \
&& apk add ca-certificates wget \
&& update-ca-certificates
COPY --from=composer /usr/bin/composer /usr/bin/
RUN apk add --no-cache mysql-client msmtp perl wget procps shadow libzip libpng libjpeg-turbo libwebp freetype icu
RUN apk add --no-cache --virtual build-essentials \
icu-dev icu-libs zlib-dev g++ make automake autoconf libzip-dev \
libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev && \
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp && \
docker-php-ext-install gd && \
docker-php-ext-install mysqli && \
docker-php-ext-install pdo_mysql && \
docker-php-ext-install intl && \
docker-php-ext-install opcache && \
docker-php-ext-install exif && \
docker-php-ext-install zip && \
apk del build-essentials && rm -rf /usr/src/php*
WORKDIR "/app"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment