I want to use docker to compile a custom PHP executable.
I plan to use alpine as a base image, installing the required tools (build-essentials, etc).
The goal is to have the most minimalist resulting image for later use in child images.
Would it make sense to tar the resulting php binary and publish to a host, and later have the child layers just pull in the php binary?
Or does it make sense to keep the original image? What happens to all the build tools and libraries? Do they become part of the image?