Skip to content

Conversation

sethfowler
Copy link
Contributor

@sethfowler sethfowler commented Aug 19, 2022

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!

Base automatically changed from sethf/simplify-plugin-architecture to master August 22, 2022 14:34
@sethfowler sethfowler force-pushed the sethf/switch-docker-base-image-to-alpine branch from dd45c4e to 2294af5 Compare August 22, 2022 14:35
@sethfowler sethfowler force-pushed the sethf/switch-docker-base-image-to-alpine branch from 2294af5 to a66974b Compare August 22, 2022 14:36
@sethfowler sethfowler merged commit cf689cd into master Aug 22, 2022
@sethfowler sethfowler deleted the sethf/switch-docker-base-image-to-alpine branch August 22, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants