Closed godber closed 8 months ago
We attempted to roll out this change in the PR above in release:
https://github.com/terascope/teraslice/releases/tag/v0.91.0
But the resulting image showed significantly higher memory usage in large scale Kafka jobs so we rolled it back in this release:
https://github.com/terascope/teraslice/releases/tag/v0.92.0
For now this effort is on hold.
I think we should at least try to rejigger our Teraslice
Dockerfile
to try and eliminate the need for maintaining our own base image. I think the approach would be to use a Multistage Dockerfile (https://docs.docker.com/build/building/multi-stage/) whose first stage creates a temporary "dev image" (not pushed anywhere) that has all thenode-gyp
C dependencies and builds Teraslice. Then the second stage will build a smaller final image from the output of the dev image.Roughly speaking:
FROM
one of these: https://hub.docker.com/_/nodebookworm
, thenbullseye
, thenalpine
bookworm
, and the final image should bebookworm-slim
(adjust debian release name as appropriate)I think we can still parameterize the Node version the same way we are now. Our main goal here is to isolate the changes as much as possible in the
Dockerfile
and making sure what we build passese2e
tests.Ref:
When considering naming schemes for our Docker images in the issue below, I thought its probably worth trying out:
https://github.com/terascope/debian-base/issues/1#issuecomment-1883904854