Initial Commit
This commit is contained in:
21
docker/php/Dockerfile
Normal file
21
docker/php/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
FROM php:5.6-apache
|
||||
COPY docker-php-pecl-install /usr/local/bin/
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libpng12-dev \
|
||||
libicu-dev \
|
||||
git \
|
||||
zip \
|
||||
libzip-dev \
|
||||
&& docker-php-ext-install intl pdo_mysql mcrypt mbstring zip \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-pecl-install xdebug-2.3.3
|
||||
|
||||
RUN a2enmod rewrite
|
||||
RUN usermod -u 1000 www-data
|
||||
COPY config/php.ini /usr/local/etc/php/
|
||||
COPY config/vhost/vhost.conf /etc/apache2/sites-enabled/
|
||||
14
docker/php/config/php.ini
Normal file
14
docker/php/config/php.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
post_max_size=20M
|
||||
html_errors=On
|
||||
display_errors=On
|
||||
date.timezone=Europe/Paris
|
||||
memory_limit=-1
|
||||
|
||||
[xdebug]
|
||||
xdebug.cli_color=1
|
||||
xdebug.var_display_max_children=-1
|
||||
xdebug.var_display_max_depth=-1
|
||||
xdebug.var_display_max_data=-1
|
||||
xdebug.remote_enable=1
|
||||
xdebug.remote_connect_back=1
|
||||
xdebug.remote_port=9000
|
||||
11
docker/php/config/vhost/vhost.conf
Normal file
11
docker/php/config/vhost/vhost.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot /var/www/html/web
|
||||
|
||||
SetEnv SYMFONY_ENV "dev"
|
||||
|
||||
<Directory /var/www/html/web>
|
||||
DirectoryIndex index.php
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
34
docker/php/docker-php-pecl-install
Normal file
34
docker/php/docker-php-pecl-install
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd /usr/src/php/ext
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 extension-version [extension-version] ...]"
|
||||
echo " ie: $0 oauth-1.2.3 uploadprogress-1.0.3.1"
|
||||
}
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
ext="$1"
|
||||
shift
|
||||
if [ -d "$ext" ]; then
|
||||
echo >&2 "error: $(pwd -P)/$ext exists already"
|
||||
echo >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
exts+=( "$ext" )
|
||||
done
|
||||
|
||||
if [ "${#exts[@]}" -eq 0 ]; then
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for ext in "${exts[@]}"; do
|
||||
(
|
||||
mkdir -p $ext
|
||||
curl -sSL "http://pecl.php.net/get/$ext" | tar xvz -C "$ext" --strip-components=1
|
||||
docker-php-ext-install $ext
|
||||
)
|
||||
done
|
||||
Reference in New Issue
Block a user