The builder step is mostly for archs such as arm64, where cffi requires a compiler & headers to compile successfully.
It handles downloading & compiling python packages, then exports them into wheels for output images to install.
My builds of the new images seem to be ~20MB smaller than the current ones.
While at it, I've merged the two Dockerfiles into one - Images can be built with docker build --target app -t thumbnail-cache . and docker build --target worker -t thumbnail-cache-worker .
Both images now base off of a "base" image, and just apply the tiny expose/cmd changes. This should make them use the same layers, so building the worker image after having built the main one is literally free. Not sure if workflow-built images will have the same effect.
Workflow changes included, but not tested.
The builder step is mostly for archs such as arm64, where cffi requires a compiler & headers to compile successfully. It handles downloading & compiling python packages, then exports them into wheels for output images to install. My builds of the new images seem to be ~20MB smaller than the current ones. While at it, I've merged the two Dockerfiles into one - Images can be built with
docker build --target app -t thumbnail-cache .
anddocker build --target worker -t thumbnail-cache-worker .
Both images now base off of a "base" image, and just apply the tiny expose/cmd changes. This should make them use the same layers, so building the worker image after having built the main one is literally free. Not sure if workflow-built images will have the same effect. Workflow changes included, but not tested.