Fix implicit upgrade of composer to version 2

This commit is contained in:
Cedric Ziel
2021-02-11 08:49:57 +01:00
parent 80616f0090
commit 9091749a9d
2 changed files with 12 additions and 18 deletions

View File

@@ -1,16 +1,10 @@
# Use composer to install dependencies
FROM composer AS build
COPY composer.json /app/
RUN composer install
#
# Build the app
#
FROM php:7.4-apache
RUN docker-php-ext-install pdo_mysql
RUN apt-get update && apt-get install -yqq unzip libzip-dev \
&& docker-php-ext-install pdo_mysql opcache zip
# Enable AutoProfile for PHP which is currently opt-in beta
RUN echo "instana.enable_auto_profile=1" > "/usr/local/etc/php/conf.d/zzz-instana-extras.ini"
@@ -22,11 +16,11 @@ RUN a2enmod rewrite && a2enmod status
WORKDIR /var/www/html
# copy dependencies from previous step
COPY --from=build /app/vendor/ /var/www/html/vendor/
COPY html/ /var/www/html
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN composer install
# This is important. Symfony needs write permissions and we
# dont know the context in which the container will run, i.e.
# which user will be forced from the outside so better play

View File

@@ -1,17 +1,17 @@
{
"require": {
"php": "^7.3",
"php": "^7.4",
"ext-curl": "*",
"ext-json": "*",
"ext-pdo": "*",
"psr/log": "*",
"monolog/monolog": "^1.24.0",
"symfony/config": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/routing": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/framework-bundle": "^5.0",
"symfony/config": "^5.2",
"symfony/http-kernel": "^5.2",
"symfony/http-foundation": "^5.2",
"symfony/routing": "^5.2",
"symfony/dependency-injection": "^5.2",
"symfony/framework-bundle": "^5.2",
"doctrine/annotations": "^1.10",
"symfony/monolog-bundle": "^3.5",
"instana/instana-php-sdk": "^1.10"