Skip to content

Commit

Permalink
#38 - composer binary improvements (#40)
Browse files Browse the repository at this point in the history
* Use composer binary docker image instead curl installation

* Update Dockerfile

Co-authored-by: Krzysztof Rewak <[email protected]>
  • Loading branch information
mtracz and krzysztofrewak authored Nov 18, 2022
1 parent 9ca6e41 commit a0fbe35
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
ARG PHP_VERSION=8.1.12-fpm-alpine
ARG COMPOSER_TAG_VERSION=2.4.4-bin

FROM composer/composer:${COMPOSER_TAG_VERSION} AS composer_binary

FROM php:${PHP_VERSION}

ARG COMPOSER_VERSION=2.4.4
COPY --from=composer_binary /composer /usr/bin/composer

ENV COMPOSER_HOME=/application/.composer
ENV COMPOSER_MEMORY_LIMIT=-1

RUN apk update && apk upgrade \
&& apk add --no-cache icu-dev \
&& curl -sS https://getcomposer.org/installer | php -- --version="${COMPOSER_VERSION}" --install-dir=/usr/local/bin --filename=composer \
&& docker-php-ext-install mysqli pdo pdo_mysql
&& docker-php-ext-install \
mysqli \
pdo \
pdo_mysql

0 comments on commit a0fbe35

Please sign in to comment.