Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +21 -28
Dockerfile
CHANGED
|
@@ -1,53 +1,46 @@
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
RUN echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list
|
| 5 |
-
|
| 6 |
-
# 2) Pin bullseye so it won't "downgrade" other packages (like freetype)
|
| 7 |
-
RUN printf "Package: *\nPin: release n=bullseye\nPin-Priority: 100\n\nPackage: libc-client-dev\nPin: release n=bullseye\nPin-Priority: 990\n" \
|
| 8 |
-
> /etc/apt/preferences.d/pin-bullseye
|
| 9 |
-
|
| 10 |
-
# 3) Install dependencies
|
| 11 |
-
# - GD deps from base distro (no version conflict)
|
| 12 |
-
# - libc-client-dev explicitly from bullseye
|
| 13 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 14 |
libpng-dev \
|
| 15 |
libjpeg62-turbo-dev \
|
| 16 |
libfreetype6-dev \
|
| 17 |
libwebp-dev \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
libonig-dev \
|
| 19 |
libxml2-dev \
|
|
|
|
| 20 |
zip \
|
| 21 |
unzip \
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
&&
|
| 27 |
-
&& rm -f /etc/apt/sources.list.d/bullseye.list \
|
| 28 |
-
&& rm -f /etc/apt/preferences.d/pin-bullseye
|
| 29 |
|
| 30 |
-
# 4) Configure & install IMAP
|
| 31 |
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
| 32 |
-
&& docker-php-ext-install imap
|
| 33 |
|
| 34 |
-
|
| 35 |
-
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
| 36 |
-
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql mysqli \
|
| 37 |
&& docker-php-ext-enable mysqli
|
| 38 |
|
| 39 |
-
#
|
| 40 |
-
RUN a2enmod rewrite
|
| 41 |
-
|
| 42 |
|
| 43 |
-
#
|
| 44 |
WORKDIR /var/www/html
|
| 45 |
COPY . .
|
| 46 |
|
| 47 |
-
#
|
| 48 |
RUN chown -R www-data:www-data /var/www/html/bank-update || true
|
| 49 |
|
| 50 |
-
#
|
| 51 |
COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
|
| 52 |
|
| 53 |
CMD ["apache2-foreground"]
|
|
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
+
# Install dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
+
# GD deps
|
| 6 |
libpng-dev \
|
| 7 |
libjpeg62-turbo-dev \
|
| 8 |
libfreetype6-dev \
|
| 9 |
libwebp-dev \
|
| 10 |
+
# IMAP deps (modern)
|
| 11 |
+
libc-client2007e-dev \
|
| 12 |
+
libkrb5-dev \
|
| 13 |
+
libssl-dev \
|
| 14 |
+
# Other deps you had
|
| 15 |
libonig-dev \
|
| 16 |
libxml2-dev \
|
| 17 |
+
libldap2-dev \
|
| 18 |
zip \
|
| 19 |
unzip \
|
| 20 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
+
|
| 22 |
+
# Configure & install extensions
|
| 23 |
+
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
|
| 24 |
+
&& docker-php-ext-install -j$(nproc) gd
|
|
|
|
|
|
|
| 25 |
|
|
|
|
| 26 |
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
| 27 |
+
&& docker-php-ext-install -j$(nproc) imap
|
| 28 |
|
| 29 |
+
RUN docker-php-ext-install -j$(nproc) pdo pdo_mysql mysqli \
|
|
|
|
|
|
|
| 30 |
&& docker-php-ext-enable mysqli
|
| 31 |
|
| 32 |
+
# Enable Apache Rewrite and set port
|
| 33 |
+
RUN a2enmod rewrite \
|
| 34 |
+
&& sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
|
| 35 |
|
| 36 |
+
# Setup files
|
| 37 |
WORKDIR /var/www/html
|
| 38 |
COPY . .
|
| 39 |
|
| 40 |
+
# Set permissions
|
| 41 |
RUN chown -R www-data:www-data /var/www/html/bank-update || true
|
| 42 |
|
| 43 |
+
# Link the Apache config
|
| 44 |
COPY apache-config.conf /etc/apache2/sites-available/000-default.conf
|
| 45 |
|
| 46 |
CMD ["apache2-foreground"]
|