-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.base
70 lines (52 loc) · 1.3 KB
/
Dockerfile.base
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM composer:2.0 as vendor
WORKDIR /var/www/html
COPY database/ database/
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
COPY . .
FROM php:7.3-apache
LABEL maintainer="David Fichtenbaum"
WORKDIR /var/www/html
EXPOSE 80
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
g++ \
make \
git \
unzip \
zip \
libmcrypt-dev \
libcurl4-openssl-dev \
libxml2-dev \
libzip-dev \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure bcmath --enable-bcmath \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql \
&& docker-php-ext-configure mbstring --enable-mbstring \
&& docker-php-ext-configure zip --with-libzip \
&& docker-php-ext-install -j$(nproc) \
bcmath \
pdo_mysql \
zip \
curl \
json \
fileinfo \
tokenizer \
xml \
opcache \
ctype \
pcntl
USER www-data:www-data
COPY --chown=www-data:www-data --from=vendor /var/www/html/vendor /var/www/html/vendor
COPY --chown=www-data:www-data . /var/www/html
RUN a2enmod rewrite
RUN php artisan key:generate
RUN php artisan config:cache
RUN php artisan route:cache
RUN composer dump-autoload