This repository was archived by the owner on Nov 21, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 1+ FROM php:7.2.11-fpm-alpine AS php
2+
3+ ENV PHP_EXTENSION_DIR=/usr/local/lib/php/extensions/no-debug-non-zts-20170718
4+
5+
6+
17#
28# Stage: Composer install for production
39#
@@ -20,7 +26,7 @@ RUN composer --no-interaction dump-autoload --classmap-authoritative
2026#
2127# Stage: Production environment
2228#
23- FROM php:7.2.11-fpm-alpine AS prod
29+ FROM php AS prod
2430
2531WORKDIR /app
2632
@@ -114,9 +120,9 @@ RUN bin/console assets:install && \
114120
115121
116122#
117- # Stage: Debug environment
123+ # Stage: Install Xdebug
118124#
119- FROM dev AS debug
125+ FROM php AS xdebug
120126
121127RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
122128 pecl install \
@@ -128,4 +134,14 @@ RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS && \
128134 apk del .build-deps && \
129135 rm -rf /var/cache/apk/
130136
137+
138+
139+ #
140+ # Stage: Debug environment
141+ #
142+ FROM dev AS debug
143+
144+ COPY --from=xdebug ${PHP_EXTENSION_DIR}/*.so ${PHP_EXTENSION_DIR}/
145+ COPY --from=xdebug ${PHP_INI_DIR}/conf.d/*.ini ${PHP_INI_DIR}/conf.d/
146+
131147COPY .docker/php-debug.ini ${PHP_INI_DIR}/conf.d/02-app.ini
You can’t perform that action at this time.
0 commit comments