This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (45 loc) · 2.4 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
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
FROM php:rc-fpm-alpine
ARG BUILD_DATE
ARG VCS_REF
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV PHP_XDEBUG_DEFAULT_ENABLE ${PHP_XDEBUG_DEFAULT_ENABLE:-1}
ENV PHP_XDEBUG_REMOTE_ENABLE ${PHP_XDEBUG_REMOTE_ENABLE:-1}
ENV PHP_XDEBUG_REMOTE_HOST ${PHP_XDEBUG_REMOTE_HOST:-"127.0.0.1"}
ENV PHP_XDEBUG_REMOTE_PORT ${PHP_XDEBUG_REMOTE_PORT:-9000}
ENV PHP_XDEBUG_REMOTE_AUTO_START ${PHP_XDEBUG_REMOTE_AUTO_START:-1}
ENV PHP_XDEBUG_REMOTE_CONNECT_BACK ${PHP_XDEBUG_REMOTE_CONNECT_BACK:-1}
ENV PHP_XDEBUG_IDEKEY ${PHP_XDEBUG_IDEKEY:-docker}
ENV PHP_XDEBUG_PROFILER_ENABLE ${PHP_XDEBUG_PROFILER_ENABLE:-0}
ENV PHP_XDEBUG_PROFILER_OUTPUT_DIR ${PHP_XDEBUG_PROFILER_OUTPUT_DIR:-"/tmp"}
LABEL Maintainer="Zaher Ghaibeh <[email protected]>" \
Description="Lightweight php 7.3 RC container based on alpine with xDebug enabled & composer installed." \
org.label-schema.name="zaherg/php-7.3-rc-xdebug-alpine" \
org.label-schema.description="Lightweight php php 7.3 RC container based on alpine with xDebug enabled & composer installed." \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/linuxjuggler/php-7.3-rc-xdebug-alpine.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0"
RUN set -ex \
&& apk update \
&& apk add --no-cache git mysql-client curl openssh-client icu libpng freetype libzip \
libjpeg-turbo postgresql-dev libffi-dev libsodium \
&& apk add --no-cache --virtual build-dependencies icu-dev libxml2-dev freetype-dev libzip-dev libpng-dev \
libjpeg-turbo-dev g++ make autoconf libsodium-dev\
&& mkdir /src && cd /src && git clone https://github.com/xdebug/xdebug.git \
&& cd xdebug \
&& sh ./rebuild.sh \
&& docker-php-source extract \
&& pecl install redis libsodium \
&& docker-php-ext-enable xdebug redis sodium \
&& docker-php-source delete \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) pdo pgsql pdo_mysql pdo_pgsql intl zip gd \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& cd / && rm -fr /src \
&& apk del build-dependencies \
&& rm -rf /tmp/*
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug-dev.ini
USER www-data
WORKDIR /var/www
CMD ["php-fpm"]