Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (51 loc) · 1.48 KB
/
Copy pathDockerfile
File metadata and controls
59 lines (51 loc) · 1.48 KB
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
#
#--------------------------------------------------------------------------
# Official Composer Image
#--------------------------------------------------------------------------
#
FROM composer:1.8 as composer
#
# Author
#
LABEL maintainer="Gilberto Junior <olamundo@gmail.com>"
#
# Copy files
#
COPY composer.json composer.json
#
# Download php deps
#
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
#
#--------------------------------------------------------------------------
# Official PHP Image
#--------------------------------------------------------------------------
#
FROM php:7.3-cli-alpine3.10
#
#--------------------------------------------------------------------------
# CUSTOMIZATION
#--------------------------------------------------------------------------
#
COPY --from=composer /app/vendor /usr/share/app/vendor
WORKDIR /usr/share/app/
RUN set -ex \
&& apk --no-cache add --virtual .build-deps $PHPIZE_DEPS \
&& pecl install \
xdebug \
&& docker-php-ext-enable \
xdebug \
&& { find /usr/local/lib -type f -print0 | xargs -0r strip --strip-all -p 2>/dev/null || true; } \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/local/lib/php/doc/*
#
#--------------------------------------------------------------------------
# Add source
#--------------------------------------------------------------------------
#
COPY . /usr/share/app