Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +1 -15
Dockerfile
CHANGED
|
@@ -1,31 +1,18 @@
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
-
# Fix port
|
| 4 |
RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf \
|
| 5 |
/etc/apache2/sites-enabled/000-default.conf
|
| 6 |
|
| 7 |
-
# System dependencies
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
-
libpng-dev libjpeg-dev libfreetype6-dev \
|
| 10 |
-
libzip-dev libicu-dev libxml2-dev \
|
| 11 |
sqlite3 libsqlite3-dev unzip curl \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
|
| 15 |
-
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
| 16 |
-
&& docker-php-ext-install -j"$(nproc)" \
|
| 17 |
-
gd pdo pdo_sqlite mysqli zip intl opcache mbstring xml
|
| 18 |
|
| 19 |
-
# Apache modules
|
| 20 |
RUN a2enmod rewrite headers
|
| 21 |
|
| 22 |
-
# PHP config
|
| 23 |
-
COPY config/php.ini /usr/local/etc/php/conf.d/99-custom.ini
|
| 24 |
-
|
| 25 |
-
# API files
|
| 26 |
COPY api/ /var/www/api/
|
| 27 |
|
| 28 |
-
# Apache config — write directly, no external file needed
|
| 29 |
RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf && \
|
| 30 |
printf '<VirtualHost *:7860>\n\
|
| 31 |
DocumentRoot /var/www/html\n\
|
|
@@ -42,7 +29,6 @@ RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf && \
|
|
| 42 |
</Directory>\n\
|
| 43 |
</VirtualHost>\n' > /etc/apache2/sites-enabled/000-default.conf
|
| 44 |
|
| 45 |
-
# Entrypoint
|
| 46 |
COPY entrypoint.sh /entrypoint.sh
|
| 47 |
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
|
| 48 |
|
|
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
|
|
|
| 3 |
RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf \
|
| 4 |
/etc/apache2/sites-enabled/000-default.conf
|
| 5 |
|
|
|
|
| 6 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
|
|
| 7 |
sqlite3 libsqlite3-dev unzip curl \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
+
RUN docker-php-ext-install pdo pdo_sqlite mysqli opcache mbstring
|
|
|
|
|
|
|
|
|
|
| 11 |
|
|
|
|
| 12 |
RUN a2enmod rewrite headers
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
COPY api/ /var/www/api/
|
| 15 |
|
|
|
|
| 16 |
RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf && \
|
| 17 |
printf '<VirtualHost *:7860>\n\
|
| 18 |
DocumentRoot /var/www/html\n\
|
|
|
|
| 29 |
</Directory>\n\
|
| 30 |
</VirtualHost>\n' > /etc/apache2/sites-enabled/000-default.conf
|
| 31 |
|
|
|
|
| 32 |
COPY entrypoint.sh /entrypoint.sh
|
| 33 |
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
|
| 34 |
|