Stabilize Dockerfile for PHP Apache
This commit is contained in:
+8
-4
@@ -1,13 +1,15 @@
|
||||
FROM php:8.2-apache
|
||||
FROM php:8.2-apache-bookworm
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libcurl4-openssl-dev \
|
||||
libonig-dev \
|
||||
ca-certificates \
|
||||
unzip \
|
||||
git \
|
||||
&& docker-php-ext-install curl mbstring mysqli pdo pdo_mysql \
|
||||
&& a2enmod rewrite \
|
||||
&& echo "ServerName localhost" > /etc/apache2/conf-available/servername.conf \
|
||||
&& a2enconf servername \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /var/www/html/
|
||||
@@ -15,3 +17,5 @@ COPY . /var/www/html/
|
||||
RUN mkdir -p /var/www/html/api/cache \
|
||||
&& chown -R www-data:www-data /var/www/html \
|
||||
&& chmod -R 775 /var/www/html/api/cache
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user