-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
40 lines (38 loc) · 925 Bytes
/
Dockerfile
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
34
35
36
37
38
39
40
FROM php:8.4-bookworm
LABEL maintainer="Andrea Falco <[email protected]>"
# PHP ext-gd
RUN set -eux; \
persistentDeps=" \
libfreetype6 \
libjpeg62-turbo \
libpng16-16 \
libwebp7 \
libxpm4 \
"; \
buildDeps=" \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libwebp-dev \
libxpm-dev \
"; \
DEBIAN_FRONTEND=noninteractive apt-get update; \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
${persistentDeps} \
${buildDeps} \
; \
\
docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp \
--with-xpm \
; \
docker-php-ext-install -j$(nproc) gd; \
\
DEBIAN_FRONTEND=noninteractive apt-get purge -y --auto-remove \
-o APT::AutoRemove::RecommendsImportant=false \
-o APT::AutoRemove::SuggestsImportant=false \
${buildDeps} \
; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*