Currently, we download the Tini, Kafka Exporter, and JMX Exporter binaries directly in the production images. I think it might make sense to use a multi-stage build, download them in the first stage and then only copy the binary into the production stage? 🤔
It might help to better separate build steps from production. It might also make the container more portable. E.g. if you want to use your own special base image, you can still use UBI image for the build stage and thus not have to deal with incompatibilities. It would also slightly clean the layers and the environment variables (e.g- remove the SHA512 checksums from the production image etc.)
Currently, we download the Tini, Kafka Exporter, and JMX Exporter binaries directly in the production images. I think it might make sense to use a multi-stage build, download them in the first stage and then only copy the binary into the production stage? 🤔
It might help to better separate build steps from production. It might also make the container more portable. E.g. if you want to use your own special base image, you can still use UBI image for the build stage and thus not have to deal with incompatibilities. It would also slightly clean the layers and the environment variables (e.g- remove the SHA512 checksums from the production image etc.)