docker icon indicating copy to clipboard operation
docker copied to clipboard

Introduce `composer-binary` low-size image

Open Wirone opened this issue 3 years ago • 0 comments

One of the techniques of Composer installation inside Docker images is copying pre-built binary from official Composer image:

FROM php:8-alpine

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

This is my favourite approach, but it has small downside as discussed today - it requires downloading of ~180MB, just to extract one file from it.

So here's feature request: introduce build and release process for composer-binary image, that would contain only pre-built binary (based on FROM scratch). It should be versioned as current image, but size of it would be much smaller and it would require much less bandwidth during builds.

Alternatively it could be pushed to the same repository, but with composer:X.Y.Z-binary tagging convention.

Let me know what should be steps for it, maybe I could implement it 🙂

Wirone avatar Jul 07 '22 14:07 Wirone