forked from php-imagine/Imagine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 852 Bytes
/
Dockerfile
File metadata and controls
33 lines (27 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ARG PHP_VERSION=8.3
FROM php:${PHP_VERSION}-cli
ARG DEBIAN_FRONTEND=noninteractive
ARG IMAGE_DRIVER=imagick
RUN apt-get update && apt-get install -y --no-install-recommends \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libwebp-dev \
libmagickwand-dev \
libgraphicsmagick1-dev \
imagemagick \
git \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp \
&& docker-php-ext-install -j$(nproc) gd exif
RUN if [ "$IMAGE_DRIVER" = "imagick" ]; then \
pecl install imagick && docker-php-ext-enable imagick; \
elif [ "$IMAGE_DRIVER" = "gmagick" ]; then \
pecl install gmagick-2.0.6RC1 && docker-php-ext-enable gmagick; \
fi
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app