diff --git a/Dockerfile b/Dockerfile index 2ce48e5..b956d1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ # docker build -f Dockerfile-dev -t api-tools . # docker run -it -p "8080:80" -v $PWD:/var/www api-tools # +FROM composer:2.3.5 AS get-composer FROM php:8.0-apache RUN apt-get update \ @@ -31,7 +32,8 @@ RUN apt-get update \ && a2enmod rewrite \ && sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \ && mv /var/www/html /var/www/public \ - && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && echo "AllowEncodedSlashes On" >> /etc/apache2/apache2.conf +COPY --from=get-composer /usr/bin/composer /usr/local/bin/composer + WORKDIR /var/www