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 0
/
Copy pathDockerfile
34 lines (29 loc) · 1.67 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
FROM php:7.0-fpm-alpine
ARG BUILD_DATE
ARG VCS_REF
ENV COMPOSER_ALLOW_SUPERUSER 1
LABEL Maintainer="Zaher Ghaibeh <[email protected]>" \
Description="Lightweight php 7.0 container based on alpine with xDebug enabled & composer installed." \
org.label-schema.name="php-7.0-xdebug-alpine" \
org.label-schema.description="Lightweight php 7.0 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.0-xdebug-alpine.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0"
RUN apk update \
&& apk add --no-cache git mysql-client curl libmcrypt libmcrypt-dev libsodium libsodium-dev \
libxml2-dev freetype-dev libpng-dev libjpeg-turbo-dev g++ make autoconf \
&& docker-php-source extract \
&& pecl install xdebug redis libsodium \
&& docker-php-ext-enable xdebug redis sodium \
&& docker-php-source delete \
&& docker-php-ext-install mcrypt pdo_mysql soap \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_handler=dbgp" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.remote_connect_back=0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& rm -rf /tmp/*
USER www-data
WORKDIR /var/www