-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (23 loc) · 948 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# For github action
FROM php:7.4-apache
COPY ./docker/php/php.ini /usr/local/etc/php/php.ini
COPY ./docker/apache/000-default.conf /etc/apache2/sites-available/
COPY ./laravel /var/www/laravel
WORKDIR /var/www/laravel
RUN apt-get update && \
apt-get -y install git unzip libzip-dev libicu-dev libonig-dev && \
apt-get clean && \
pecl install redis && \
docker-php-ext-enable redis && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-install intl pdo_mysql zip bcmath
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer install --no-dev && composer global require "laravel/installer"
RUN if [ ! -d "database/seeds" ]; then mkdir database/seeds; fi
RUN if [ ! -d "database/factories" ]; then mkdir database/factories; fi
RUN php artisan cache:clear \
&& php artisan config:clear \
&& php artisan route:clear \
&& php artisan view:clear
RUN chown -R www-data:www-data storage
RUN a2ensite 000-default