-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (35 loc) · 1.06 KB
/
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
41
FROM php:8.3-cli
LABEL maintainer="[email protected]"
# Met à jour le système et installe les dépendances
RUN set -xe \
&& apt update \
&& apt upgrade -y \
&& apt install -y --no-install-recommends \
curl \
git \
gpg \
openssh-client \
rsync \
unzip \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev
# Installe les dépendances PHP
COPY --from=mlocati/php-extension-installer:2.7 /usr/bin/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
gd \
pdo_mysql \
pdo_pgsql \
calendar \
intl \
bcmath \
pcntl
# Installe Composer v2.8 de manière globale
COPY --from=composer:2.8 /usr/bin/composer /usr/bin/composer
RUN chmod +x /usr/bin/composer
# Nettoie les fichiers systèmes inutiles après l'installation
RUN set -xe \
&& apt purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*