30 lines
790 B
Docker
30 lines
790 B
Docker
FROM arm64v8/php:8.1-apache
|
|
|
|
# Installation des dépendances PHP nécessaires
|
|
RUN apt-get update && apt-get install -y \
|
|
libfreetype6-dev \
|
|
libjpeg62-turbo-dev \
|
|
libpng-dev \
|
|
git \
|
|
unzip \
|
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
|
&& docker-php-ext-install -j$(nproc) gd
|
|
|
|
# Activer le module rewrite pour Apache
|
|
RUN a2enmod rewrite
|
|
|
|
# Installer Composer
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Définir le répertoire de travail
|
|
WORKDIR /var/www/html
|
|
|
|
# Exposer le port 80
|
|
EXPOSE 80
|
|
|
|
# Script d'initialisation pour exécuter composer install et démarrer Apache
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD ["apache2-foreground"] |