-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 893 Bytes
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 893 Bytes
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
31
32
33
34
35
36
37
FROM php:7.3-apache
COPY ./php.ini /usr/local/etc/php/php.ini
RUN apt-get update && apt-get install -y \
libzip-dev \
libpng-dev \
zip \
unzip \
&& docker-php-ext-configure zip \
&& docker-php-ext-install zip pdo pdo_mysql gd
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs
WORKDIR /var/www/html
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY . /var/www/html
RUN composer install --ignore-platform-req=ext-gd
COPY 000-default.conf /etc/apache2/sites-available/000-default.conf
COPY default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
RUN php artisan config:cache && \
php artisan route:cache && \
chown -R www-data:www-data /var/www/html && \
chmod -R 755 /var/www/html && \
a2enmod rewrite
EXPOSE 80
USER www-data
CMD ["/bin/bash", "/var/www/html/scripts.sh"]