Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Verify theory - revert the commit that maybe causing errors. #8

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 17 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,22 @@
# 26-03-2024
# alpine-3.19 is vulnerable, using alipine3.18
FROM php:8.3-fpm-alpine3.18
FROM php:8.2-fpm-alpine

RUN apk add --update bash \
zlib-dev \
libpng-dev \
libzip-dev \
RUN apk add --update bash \
zlib-dev \
libpng-dev \
libzip-dev \
libxml2-dev \
libjpeg-turbo \
libgomp \
ghostscript \
imagemagick \
imagemagick-libs \
imagemagick-dev \
icu-dev \
mariadb-client

RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
&& pecl install excimer \
&& docker-php-ext-enable excimer

WORKDIR /tmp

ARG IMAGICK_VERSION=3.7.0
# Imagick is installed from the archive because regular installation fails
# See: https://github.com/Imagick/imagick/issues/643#issuecomment-1834361716
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
&& phpize && ./configure && make && make install \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini \
&& rm -rf /tmp/*


WORKDIR /var/www/html

RUN docker-php-ext-configure intl && \
docker-php-ext-install exif gd zip mysqli opcache intl

RUN apk del -f .build-deps $PHPIZE_DEPS
ghostscript imagemagick imagemagick-libs imagemagick-dev libjpeg-turbo libgomp freetype-dev \
icu-dev \
htop \
mariadb-client \
$PHPIZE_DEPS

RUN pecl install imagick
RUN docker-php-ext-enable imagick && \
docker-php-ext-configure intl && \
docker-php-ext-install -j "$(nproc)" exif gd zip mysqli opcache intl

RUN apk del $PHPIZE_DEPS

RUN echo "opcache.jit_buffer_size=500000000" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini

Expand Down
Loading