forked from petrknap/php-migrationtool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp.dockerfile
32 lines (28 loc) · 1.13 KB
/
php.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
FROM php:7.1-cli
# Install GD
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
;
# Install Intl
RUN apt-get update && apt-get install -y \
libicu-dev \
&& docker-php-ext-install intl \
;
# Install packages
RUN apt update && apt install -y \
git \
unzip \
;
# Install composer
RUN cd /tmp && \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "copy('https://composer.github.io/installer.sig', 'composer-setup.php.sig');" && \
php -r "if (trim(hash_file('SHA384', 'composer-setup.php')) === trim(file_get_contents('composer-setup.php.sig'))) { echo 'Installer verified' . PHP_EOL; exit(0); } else { echo 'Installer corrupt' . PHP_EOL; unlink('composer-setup.php'); unlink('composer-setup.php.sig'); exit(-1); }" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php'); unlink('composer-setup.php.sig');" && \
mv composer.phar /usr/local/bin/composer