Upgrade the Docker setup and dependencies

This commit is contained in:
Kévin Dunglas
2017-06-12 10:21:33 +02:00
parent 10b49ace3d
commit df6286b2e9
16 changed files with 147 additions and 68 deletions

View File

@@ -3,7 +3,6 @@ FROM php:7.1-fpm-alpine
RUN apk add --no-cache --virtual .persistent-deps \
git \
icu-libs \
make \
zlib
ENV APCU_VERSION 5.1.8
@@ -23,10 +22,9 @@ RUN set -xe \
&& docker-php-ext-enable --ini-name 05-opcache.ini opcache \
&& apk del .build-deps
COPY docker/php/php.ini /usr/local/etc/php/php.ini
COPY docker/php/install-composer.sh /usr/local/bin/docker-app-install-composer
COPY docker/app/php.ini /usr/local/etc/php/php.ini
COPY docker/app/install-composer.sh /usr/local/bin/docker-app-install-composer
RUN chmod +x /usr/local/bin/docker-app-install-composer
RUN set -xe \
@@ -42,7 +40,7 @@ ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress --no-suggest --optimize-autoloader --classmap-authoritative \
&& composer clear-cache
WORKDIR /srv/api-platform
WORKDIR /srv/app
COPY composer.json ./
COPY composer.lock ./
@@ -63,8 +61,8 @@ COPY web web/
RUN composer dump-autoload --optimize --classmap-authoritative --no-dev
COPY docker/php/start.sh /usr/local/bin/docker-app-start
COPY docker/app/docker-entrypoint.sh /usr/local/bin/docker-app-entrypoint
RUN chmod +x /usr/local/bin/docker-app-entrypoint
RUN chmod +x /usr/local/bin/docker-app-start
CMD ["docker-app-start"]
ENTRYPOINT ["docker-app-entrypoint"]
CMD ["php-fpm"]