v1.0.0
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM php:apache
|
||||
|
||||
# Instalacja niezbędnych pakietów (dodano git, który jest kluczowy dla Composera)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libonig-dev \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
git \
|
||||
libldap2-dev \
|
||||
&& docker-php-ext-install curl mysqli pdo pdo_mysql ldap zip
|
||||
|
||||
# Kopiowanie Composera z oficjalnego obrazu
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Włączenie mod_rewrite dla Apache
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Ustawienie DocumentRoot na /var/www/html/public
|
||||
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
|
||||
|
||||
# Zmiana konfiguracji Apache, by używał nowego DocumentRoot
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/000-default.conf \
|
||||
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf
|
||||
|
||||
# Uruchomienie Apache
|
||||
CMD ["apache2-foreground"]
|
||||
Reference in New Issue
Block a user