Skip to content

Commit

Permalink
Upgrade PHP version
Browse files Browse the repository at this point in the history
Doesn't fix Travis failures, but does speed-up the build
  • Loading branch information
sstok committed Mar 19, 2020
1 parent 83cbd66 commit 5461e53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- elasticsearch
- pgsql
- mariadb-server
image: rollerworks/search-dev:latest
image: rollerworks/search-dev:php-72
volumes:
- .:/srv/www:rw

Expand Down
17 changes: 10 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM composer:1.7.3
FROM php:7.1-cli
FROM php:7.2-cli

ENV BUILD_DEPS="autoconf file g++ gcc libc-dev pkg-config re2c"
ENV LIB_DEPS="git make unzip ca-certificates zlib1g-dev libpq5 postgresql-server-dev-9.6"
ENV LIB_DEPS="git make unzip ca-certificates zlib1g-dev libpq5 postgresql-server-dev-11"
ENV ICU_RELEASE=60.1
ENV CXXFLAGS "--std=c++0x"

Expand All @@ -17,13 +16,17 @@ RUN echo "date.timezone=Europe/Amsterdam" >> $PHP_INI_DIR/php.ini \
&& docker-php-ext-configure intl && docker-php-ext-install intl \
&& apt-get purge -y --auto-remove $BUILD_DEPS

COPY --from=0 /usr/bin/composer /usr/bin/composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN ln -s /usr/bin/composer /usr/bin/composer.phar

WORKDIR /srv/www

# https://getcomposer.org/doc/03-cli.md#composer-allow-superuser
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --classmap-authoritative
# install Symfony Flex globally to speed up download of Composer packages (parallelized prefetching)
RUN set -eux; \
composer global require "symfony/flex" --prefer-dist --no-progress --no-suggest --classmap-authoritative; \
composer clear-cache
ENV PATH="${PATH}:/root/.composer/vendor/bin"

WORKDIR /srv/www

CMD icu-config --version && php -i | grep 'ICU version'

0 comments on commit 5461e53

Please sign in to comment.