forked from munza/lumen-api-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (42 loc) · 932 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
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
FROM composer:1.9 as vendor
COPY ./database ./database
COPY ./tests ./tests
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
FROM php:7.4-fpm-alpine
WORKDIR /var/www/html
COPY . .
COPY --from=vendor /app/vendor ./vendor/
COPY ./docker/php/php.ini /usr/local/etc/php/php.ini
RUN apk add --no-cache \
oniguruma-dev \
mysql-client \
libxml2-dev \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
git \
vim \
zip \
unzip \
curl
RUN docker-php-ext-install \
bcmath \
mbstring \
pdo \
pdo_mysql \
tokenizer \
xml
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd
RUN adduser www-data www-data
RUN chown -R www-data:www-data .
USER www-data
EXPOSE 9000
CMD ["php-fpm"]