Switch Docker base image to alpine #15
Merged
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.
Now that #14 has eliminated the dependency on the Go
plugin
package, which was incompatible with musl, we can switch back to using an alpine base Docker image.As a quick recap, to work around that compatibility, we switched from alpine to ubuntu in #12. This increased the size of the Docker image from 62MB to 154MB, which was a bit of a bummer.
As expected, by switching back to alpine, this PR drops the size of the Docker image, but the improvement is better than one might expect. Go tends to produce fairly large binaries, so compiling each plugin into a separate binary was really bloating the size of the image. After #14's change to compile the plugins directly into the relay binary, we've removed that bloat, so the size of the Docker image after this PR will be just 22MB. In other words, taken together, the recent changes have reduced the overall size of the Docker image by 65%. Nice!
Edit: After a minor tweak, we're actually down to 19.6MB - even better!