diff --git a/docker/containers/composer/Dockerfile b/docker/containers/composer/Dockerfile index 3612d61..e919338 100644 --- a/docker/containers/composer/Dockerfile +++ b/docker/containers/composer/Dockerfile @@ -1,6 +1,10 @@ -# Install Composer -FROM composer:2.1.5 +# Pull from PHP from previous Dockerfile - php/Dockerfile +# - see docker/docker-compose.yml for more info +# - use the image tag php:php-7.4-fpm-alpine +FROM php:php-7.4-fpm-alpine -# Copy PHP from previous Dockerfile with a tag of php:php-7.4-fpm-alpine -# See docker/docker-compose.yml -COPY --from=php:php-7.4-fpm-alpine /usr/local/bin/php /usr/local/bin/php \ No newline at end of file +# Install Composer 2.1.5 +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.1.5 + +# Add composer bin files path to environment variable +RUN export PATH=$PATH":/usr/bin" diff --git a/docker/containers/php/Dockerfile b/docker/containers/php/Dockerfile index 84b28f7..739be71 100644 --- a/docker/containers/php/Dockerfile +++ b/docker/containers/php/Dockerfile @@ -2,4 +2,6 @@ FROM php:7.4-fpm-alpine # Install PHP Extension -RUN docker-php-ext-install pdo pdo_mysql +RUN apk --no-cache add zip libzip-dev \ + && docker-php-ext-configure zip \ + && docker-php-ext-install zip pdo pdo_mysql diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 97224ac..e4e8ffe 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -68,7 +68,6 @@ services: context: . dockerfile: containers/composer/Dockerfile image: composer:composer-2.1.5 - #image: composer:2.1.5 working_dir: /var/www/html volumes: - "${PATH_PROJECT_SOURCE}:/var/www/html"