forked from wp-graphql/wp-graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.xdebug
More file actions
18 lines (14 loc) · 742 Bytes
/
Dockerfile.xdebug
File metadata and controls
18 lines (14 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This Docker image adds XDebug to the official WordPress Docker image so that developers can step through WordPress
# plugin execution with a tool that supports XDebug.
# Using the 'DESIRED_' prefix to avoid confusion with environment variables of the same name.
ARG DESIRED_WP_VERSION
ARG DESIRED_PHP_VERSION
ARG OFFICIAL_WORDPRESS_DOCKER_IMAGE="wordpress:${DESIRED_WP_VERSION}-php${DESIRED_PHP_VERSION}-apache"
# --------------------- STAGE -----------------------
# Sets timezone to UTC and install XDebug on top of official WordPress image
FROM ${OFFICIAL_WORDPRESS_DOCKER_IMAGE}
# Install XDebug for PHP 7.X.
RUN if echo "${PHP_VERSION}" | grep '^7'; then \
pecl install xdebug; \
docker-php-ext-enable xdebug; \
fi