use multistage build to slim down backend container #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Description]
Use a multistage build to trim down about a GB from the final container
What kind of changes do it do
Use a multistage build copying the final binary (that now has debugging and symbol tables stripped to make it even smaller) into a scratch container, which has basically nothing else in it. If you want to make it even smaller, you could remove the copying of the ssl certificates, but they don't really add that much size, and might be nice to have them if you ever need to run this with TLS in production.
Please delete options that are not relevant.
Need any DB Migrations?
How have you tested this
docker-compose up --build
and navigate tolocalhost:3000
, then add some test SLOsThis change requires a documentation update?
Code Checklist
Pre-Merge Checklist