diff --git a/dockerfiles/nightly/php8.0/alpine/Dockerfile b/dockerfiles/nightly/php8.0/alpine/Dockerfile index 8cec0f4c..5ede24e7 100644 --- a/dockerfiles/nightly/php8.0/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.0/alpine/Dockerfile @@ -1,10 +1,9 @@ FROM php:8.0-cli-alpine3.16 +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ + RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update --clean-backups 2.6.5 && \ apk update && \ apk add --no-cache libstdc++ libpq && \ apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ @@ -25,7 +24,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ - rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \ + rm -f swoole.tar.gz && \ docker-php-source delete && \ apk del .build-deps diff --git a/dockerfiles/nightly/php8.0/cli/Dockerfile b/dockerfiles/nightly/php8.0/cli/Dockerfile index 9c71d035..89390e55 100644 --- a/dockerfiles/nightly/php8.0/cli/Dockerfile +++ b/dockerfiles/nightly/php8.0/cli/Dockerfile @@ -6,15 +6,13 @@ ENV TERM xterm-color ARG DEV_MODE ENV DEV_MODE $DEV_MODE +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ COPY ./rootfilesystem/ / RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update 2.6.5 && \ - apt-get update && \ - apt-get install -y \ + apt-get update && \ + apt-get install -y \ # The auto-reloading feature is supported for non-Alpine images only. # # Package "inotify-tools" is pre-installed in latest non-Alpine images. For versioned non-Alpine images, it will be @@ -42,7 +40,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ - rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static ENTRYPOINT ["/entrypoint.sh"] CMD [] diff --git a/dockerfiles/nightly/php8.1/alpine/Dockerfile b/dockerfiles/nightly/php8.1/alpine/Dockerfile index a44f8a29..e7ce6f47 100644 --- a/dockerfiles/nightly/php8.1/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.1/alpine/Dockerfile @@ -1,10 +1,9 @@ FROM php:8.1-cli-alpine3.18 +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ + RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update --clean-backups 2.6.5 && \ apk update && \ apk add --no-cache libstdc++ libpq && \ apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ @@ -25,7 +24,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ - rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \ + rm -f swoole.tar.gz && \ docker-php-source delete && \ apk del .build-deps diff --git a/dockerfiles/nightly/php8.1/cli/Dockerfile b/dockerfiles/nightly/php8.1/cli/Dockerfile index 01d61cd8..26e22558 100644 --- a/dockerfiles/nightly/php8.1/cli/Dockerfile +++ b/dockerfiles/nightly/php8.1/cli/Dockerfile @@ -6,15 +6,13 @@ ENV TERM xterm-color ARG DEV_MODE ENV DEV_MODE $DEV_MODE +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ COPY ./rootfilesystem/ / RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update 2.6.5 && \ - apt-get update && \ - apt-get install -y \ + apt-get update && \ + apt-get install -y \ # The auto-reloading feature is supported for non-Alpine images only. # # Package "inotify-tools" is pre-installed in latest non-Alpine images. For versioned non-Alpine images, it will be @@ -42,7 +40,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ - rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static ENTRYPOINT ["/entrypoint.sh"] CMD [] diff --git a/dockerfiles/nightly/php8.2/alpine/Dockerfile b/dockerfiles/nightly/php8.2/alpine/Dockerfile index c4761b66..296a9624 100644 --- a/dockerfiles/nightly/php8.2/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.2/alpine/Dockerfile @@ -1,10 +1,9 @@ FROM php:8.2-cli-alpine3.18 +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ + RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update --clean-backups 2.6.5 && \ apk update && \ apk add --no-cache libstdc++ libpq && \ apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ @@ -25,7 +24,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ - rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \ + rm -f swoole.tar.gz && \ docker-php-source delete && \ apk del .build-deps diff --git a/dockerfiles/nightly/php8.2/cli/Dockerfile b/dockerfiles/nightly/php8.2/cli/Dockerfile index baee96e3..cc587d76 100644 --- a/dockerfiles/nightly/php8.2/cli/Dockerfile +++ b/dockerfiles/nightly/php8.2/cli/Dockerfile @@ -6,15 +6,13 @@ ENV TERM xterm-color ARG DEV_MODE ENV DEV_MODE $DEV_MODE +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ COPY ./rootfilesystem/ / RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update 2.6.5 && \ - apt-get update && \ - apt-get install -y \ + apt-get update && \ + apt-get install -y \ # The auto-reloading feature is supported for non-Alpine images only. # # Package "inotify-tools" is pre-installed in latest non-Alpine images. For versioned non-Alpine images, it will be @@ -42,7 +40,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ - rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static ENTRYPOINT ["/entrypoint.sh"] CMD [] diff --git a/dockerfiles/nightly/php8.3/alpine/Dockerfile b/dockerfiles/nightly/php8.3/alpine/Dockerfile index 724245ae..a0206dcc 100644 --- a/dockerfiles/nightly/php8.3/alpine/Dockerfile +++ b/dockerfiles/nightly/php8.3/alpine/Dockerfile @@ -1,10 +1,9 @@ FROM php:8.3-cli-alpine3.18 +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ + RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update --clean-backups 2.6.5 && \ apk update && \ apk add --no-cache libstdc++ libpq && \ apk add --no-cache --virtual .build-deps $PHPIZE_DEPS curl-dev linux-headers postgresql-dev openssl-dev pcre-dev pcre2-dev zlib-dev && \ @@ -25,7 +24,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ docker-php-ext-install -j$(nproc) swoole && \ - rm -f swoole.tar.gz $HOME/.composer/*-old.phar && \ + rm -f swoole.tar.gz && \ docker-php-source delete && \ apk del .build-deps diff --git a/dockerfiles/nightly/php8.3/cli/Dockerfile b/dockerfiles/nightly/php8.3/cli/Dockerfile index 79113af4..4190369e 100644 --- a/dockerfiles/nightly/php8.3/cli/Dockerfile +++ b/dockerfiles/nightly/php8.3/cli/Dockerfile @@ -6,15 +6,13 @@ ENV TERM xterm-color ARG DEV_MODE ENV DEV_MODE $DEV_MODE +COPY --from=composer:2.6.6 /usr/bin/composer /usr/bin/ COPY ./rootfilesystem/ / RUN \ set -ex && \ - curl -sfL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ - chmod +x /usr/bin/composer && \ - composer self-update 2.6.5 && \ - apt-get update && \ - apt-get install -y \ + apt-get update && \ + apt-get install -y \ # The auto-reloading feature is supported for non-Alpine images only. # # Package "inotify-tools" is pre-installed in latest non-Alpine images. For versioned non-Alpine images, it will be @@ -42,7 +40,7 @@ RUN \ --enable-openssl \ --enable-sockets --enable-swoole-curl && \ mkdir -p /var/log/supervisor && \ - rm -rf /var/lib/apt/lists/* $HOME/.composer/*-old.phar /usr/bin/qemu-*-static + rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static ENTRYPOINT ["/entrypoint.sh"] CMD []