All checks were successful
Build and push image / build (push) Successful in 1m25s
The Reverb websocket server (artisan reverb:start) needs pcntl for SIGINT/SIGTERM/SIGTSTP signal handling on shutdown; the base php:apache image doesn't enable it by default. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
896 B
Docker
27 lines
896 B
Docker
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 pcntl posix
|
|
|
|
# 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"] |