Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +2 -35
Dockerfile
CHANGED
|
@@ -1,40 +1,7 @@
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
-
RUN
|
| 4 |
-
libpng-dev libjpeg-dev libfreetype6-dev \
|
| 5 |
-
libzip-dev libicu-dev libxml2-dev \
|
| 6 |
-
sqlite3 libsqlite3-dev unzip curl \
|
| 7 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
-
|
| 9 |
-
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
| 10 |
-
&& docker-php-ext-install -j"$(nproc)" gd pdo pdo_sqlite mysqli zip intl opcache mbstring xml
|
| 11 |
-
|
| 12 |
-
RUN a2enmod rewrite headers
|
| 13 |
-
|
| 14 |
-
COPY config/php.ini /usr/local/etc/php/conf.d/99-custom.ini
|
| 15 |
-
COPY api/ /var/www/api/
|
| 16 |
-
|
| 17 |
-
RUN echo 'Listen 7860' > /etc/apache2/ports.conf && \
|
| 18 |
-
echo '<VirtualHost *:7860>' > /etc/apache2/sites-enabled/000-default.conf && \
|
| 19 |
-
echo ' DocumentRoot /var/www/html' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 20 |
-
echo ' Alias /api /var/www/api' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 21 |
-
echo ' <Directory /var/www/api>' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 22 |
-
echo ' Options -Indexes +FollowSymLinks' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 23 |
-
echo ' AllowOverride All' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 24 |
-
echo ' Require all granted' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 25 |
-
echo ' </Directory>' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 26 |
-
echo ' <Directory /data/sites>' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 27 |
-
echo ' Options -Indexes +FollowSymLinks' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 28 |
-
echo ' AllowOverride All' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 29 |
-
echo ' Require all granted' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 30 |
-
echo ' </Directory>' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 31 |
-
echo ' ErrorLog /data/logs/apache_error.log' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 32 |
-
echo ' CustomLog /data/logs/apache_access.log combined' >> /etc/apache2/sites-enabled/000-default.conf && \
|
| 33 |
-
echo '</VirtualHost>' >> /etc/apache2/sites-enabled/000-default.conf
|
| 34 |
-
|
| 35 |
-
COPY entrypoint.sh /entrypoint.sh
|
| 36 |
-
RUN sed -i 's/\r$//' /entrypoint.sh && chmod +x /entrypoint.sh
|
| 37 |
|
| 38 |
EXPOSE 7860
|
| 39 |
|
| 40 |
-
CMD ["
|
|
|
|
| 1 |
FROM php:8.2-apache
|
| 2 |
|
| 3 |
+
RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-enabled/000-default.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
EXPOSE 7860
|
| 6 |
|
| 7 |
+
CMD ["apache2-foreground"]
|