forked from andreaskoch/dockerized-magento
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (58 loc) · 1.65 KB
/
Dockerfile
File metadata and controls
65 lines (58 loc) · 1.65 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM php:5.6-fpm
# Install PHP extension dependencies
RUN buildDeps=" \
libpng-dev \
libjpeg-dev \
libmcrypt-dev \
libxml2-dev \
libfreetype6-dev \
freetype* \
"; \
set -x \
&& apt-get update \
&& apt-get install -y $buildDeps --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install \
gd \
mbstring \
mysqli \
mcrypt \
mysql \
pdo_mysql \
soap \
zip
# Configure GD extension
RUN docker-php-ext-configure gd \
--with-png-dir=/usr \
--with-jpeg-dir=/usr \
--with-freetype-dir
# Install XDebug
RUN apt-get update -qy \
&& apt-get install -qy git-core \
&& cd /tmp/ \
&& git clone https://github.com/derickr/xdebug.git \
&& cd xdebug \
&& git checkout xdebug_2_5 \
&& phpize \
&& ./configure --enable-xdebug \
&& make \
&& mkdir /usr/lib/php5/ && cp modules/xdebug.so /usr/lib/php5/xdebug.so \
&& touch /usr/local/etc/php/ext-xdebug.ini \
&& rm -r /tmp/xdebug \
&& apt-get purge -y git-core \
&& apt-get purge -y --auto-remove
# Copy configuration files
COPY php.ini /usr/local/etc/php/php.ini
COPY php-fpm.conf /usr/local/etc/
COPY ext-xdebug.ini /usr/local/etc/php/conf.d/ext-xdebug.ini
# Make sure the volume mount point is empty
RUN rm -rf /var/www/html/*
# Install magerun
RUN curl -o magerun https://files.magerun.net/n98-magerun.phar \
&& chmod +x ./magerun \
&& cp ./magerun /usr/local/bin/ \
&& rm ./magerun \
&& apt-get update \
&& apt-get install -qy mysql-client \
&& apt-get purge -y --auto-remove