-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Dockerfile
27 lines (24 loc) · 1.03 KB
/
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
FROM php:5.6-cli-alpine3.8
ARG DOCKER_USER_ID
ARG DOCKER_GROUP_ID
RUN if ! getent group "${DOCKER_GROUP_ID}" > /dev/null; \
then addgroup -S -g "${DOCKER_GROUP_ID}" devs; \
fi \
&& if ! getent passwd "${DOCKER_USER_ID}" > /dev/null; \
then adduser -S -u "${DOCKER_USER_ID}" -G "$(getent group "${DOCKER_GROUP_ID}" | awk -F: '{printf $1}')" dev; \
fi \
&& apk add --no-cache git libxml2-dev openssh-client \
&& apk add --no-cache --virtual .build-deps autoconf g++ make \
# xdebug
&& pecl install xdebug-2.5.5 \
&& docker-php-ext-enable xdebug \
# composer
&& curl --output composer-setup.php https://getcomposer.org/installer \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php \
# xdebug command
&& curl --location --output /usr/local/bin/xdebug https://github.com/julienfalque/xdebug/releases/download/v1.1.0/xdebug \
&& chmod +x /usr/local/bin/xdebug \
# clean up
&& apk del .build-deps
COPY xdebug.ini /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini