mlocati / docker-php-extension-installer

Easily install PHP extensions in Docker containers
MIT License
4.18k stars 378 forks source link

Extensions reinstalled even when found with builkit enabled #933

Closed vasilvestre closed 2 months ago

vasilvestre commented 2 months ago

Version of install-php-extensions

latest

Error description

I run a docker built with --cache-from and BUILDKIT_INLINE_CACHE on.

#20 [php-base 10/11] RUN install-php-extensions     @composer-2     exif    gd  intl    pdo_mysql   zip     apcu     excimer     amqp
#20 0.271 install-php-extensions v.2.2.17
#20 1.399 ### WARNING Module already installed: @composer ###
#20 1.404 ### WARNING Module already installed: exif ###
#20 1.408 ### WARNING Module already installed: gd ###
#20 1.411 ### WARNING Module already installed: intl ###
#20 1.416 ### WARNING Module already installed: pdo_mysql ###
#20 1.420 ### WARNING Module already installed: zip ###
#20 1.424 ### WARNING Module already installed: apcu ###
#20 1.431 ### WARNING Module already installed: amqp ###

Then they get installed again. Is that wanted? Maybe I'm missing something?

Docker image

php:8.1-alpine

Minimal Dockerfile

FROM php:8.1-alpine

### Install basic tools ###
RUN \
    apk update && \
    apk add --no-cache \
    acl \
    file \
    gettext \
    git

### Install php extensions ###
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions

RUN install-php-extensions \
    @composer-$COMPOSER_VERSION \
    exif \
    gd \
    intl \
    pdo_mysql \
    zip \
    apcu \
    excimer \
    amqp
vasilvestre commented 2 months ago

This is a false report, it works great, only one uninstalled extension get installed 😓

mlocati commented 2 months ago

WARNING Module already installed: amqp

Yep, those are just messages that mean: "You asked me to install amqp, but I won't do it since it's already installed".