Docker: Install via `COPY –from=`

You can install binaries (especially those that build their binaries and embed it to docker image) via COPY --from command. Here’s an example for Composer:

#...

## Install composer
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer

#...

Disclaimer:

Not all articles here are meant to be correct. My notes might be wrong or may no longer be relevant. If you want to try things here, please proceed with caution.


Posted

in

by

Tags: