forked from fballiano/docker-magento2-apache-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (49 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM php:7.1-apache
MAINTAINER Fabrizio Balliano <[email protected]>
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libxslt1-dev \
git \
vim \
wget \
lynx \
psmisc \
&& apt-get clean
RUN docker-php-ext-configure \
gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/; \
docker-php-ext-install \
gd \
intl \
mbstring \
mcrypt \
pdo_mysql \
xsl \
zip \
opcache \
bcmath \
soap
ADD https://raw.githubusercontent.com/colinmollenhour/credis/master/Client.php /credis.php
ADD php.ini /usr/local/etc/php/conf.d/888-fballiano.ini
ADD register-host-on-redis.php /register-host-on-redis.php
ADD unregister-host-on-redis.php /unregister-host-on-redis.php
ADD start.sh /start.sh
RUN usermod -u 1000 www-data; \
a2enmod rewrite; \
curl -o /tmp/composer-setup.php https://getcomposer.org/installer; \
curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig; \
php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }"; \
php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer; \
rm /tmp/composer-setup.php; \
chmod +x /usr/local/bin/composer; \
curl -o n98-magerun2.phar http://files.magerun.net/n98-magerun2-latest.phar; \
chmod +x ./n98-magerun2.phar; \
chmod +x /start.sh; \
chmod +r /credis.php; \
mv n98-magerun2.phar /usr/local/bin/; \
mkdir -p /root/.composer
CMD ["/start.sh"]