mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
Tests - Docker - add required libraries, PHP extensions & optimize size of Docker's image
This commit is contained in:
@@ -3,17 +3,27 @@ FROM php:5.6-cli
|
||||
#
|
||||
# Tools & libraries
|
||||
#
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libicu-dev
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
zip \
|
||||
unzip \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
#
|
||||
# PHP Extensions
|
||||
#
|
||||
RUN docker-php-ext-install \
|
||||
intl
|
||||
zip \
|
||||
intl \
|
||||
mbstring
|
||||
|
||||
#
|
||||
# Timezone
|
||||
# PHP configuration:
|
||||
# - timezone
|
||||
#
|
||||
ARG TIMEZONE
|
||||
RUN echo "date.timezone = $TIMEZONE" >> /usr/local/etc/php/php.ini
|
||||
@@ -32,11 +42,13 @@ RUN pear channel-discover pear.phing.info \
|
||||
&& pear install [--alldeps] phing/phing
|
||||
|
||||
#
|
||||
# Composer
|
||||
# Composer + https://packagist.org/packages/hirak/prestissimo package
|
||||
#
|
||||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
|
||||
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === \
|
||||
'544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo \
|
||||
'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
|
||||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
|
||||
&& php -r "unlink('composer-setup.php');"
|
||||
&& php -r "unlink('composer-setup.php');" \
|
||||
&& composer global require --no-plugins --no-scripts hirak/prestissimo \
|
||||
&& rm -rf /root/.composer/cache/*
|
||||
|
||||
Reference in New Issue
Block a user