Files
nhgooi.nl/Dockerfile.dev
2025-07-15 15:45:09 +02:00

39 lines
1.1 KiB
Docker
Executable File

FROM php:8.1-apache
RUN apt-get update \
&& apt-get -y install \
g++ \
libcurl4-gnutls-dev \
libxml2-dev \
libxslt-dev \
libzip-dev \
zlib1g-dev \
msmtp \
unzip \
git \
ssl-cert \
locales \
--no-install-recommends \
&& docker-php-ext-install pdo pdo_mysql mysqli xsl xml zip opcache \
&& a2enmod rewrite ssl proxy proxy_http headers \
&& apt-get purge -y g++ \
&& apt-get autoremove -y \
&& rm -r /var/lib/apt/lists/*
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Update the default apache site with the config we created.
ADD docker/apache.dev.conf /etc/apache2/sites-enabled/000-default.conf
WORKDIR /var/www/html
COPY . /var/www/html
RUN mkdir -p storage/framework/{sessions,views,cache,cache/data} && \
chown -R www-data:www-data storage/framework && \
chmod -R 775 storage
# RUN php artisan cache:clear && \
# php artisan config:clear && \
# php artisan view:clear