You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.
Currently, the size of the built Docker image is >1GB. It should be possible to reduce this quite significantly with some changes which will make spinning up new gateway instances faster and cheaper.
The size can be reduced in two ways by:
Making use of multi-stage builds in Docker and only packaging production node_modules in the final image.
Using a smaller Node image like the Node alpine images.
Dropping the dependency on ts-node brought in by knex would be great as well though I'm not sure how one could do that if migrations need to be ran in the production container.
Currently, the size of the built Docker image is >1GB. It should be possible to reduce this quite significantly with some changes which will make spinning up new gateway instances faster and cheaper.
The size can be reduced in two ways by:
node_modules
in the final image.Dropping the dependency on
ts-node
brought in byknex
would be great as well though I'm not sure how one could do that if migrations need to be ran in the production container.Multi-stage builds: https://blog.logrocket.com/reduce-docker-image-sizes-using-multi-stage-builds/
Alpine and other Docker images: https://medium.com/swlh/alpine-slim-stretch-buster-jessie-bullseye-bookworm-what-are-the-differences-in-docker-62171ed4531d
The text was updated successfully, but these errors were encountered: