Add docker dev
This commit is contained in:
38
Dockerfile.dev
Normal file
38
Dockerfile.dev
Normal file
@@ -0,0 +1,38 @@
|
||||
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
|
||||
Reference in New Issue
Block a user