-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(docker): build executable #764
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 4d7648e.
erunion
approved these changes
Mar 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
This reverts commit 0d87eab.
kanadgupta
pushed a commit
that referenced
this pull request
Mar 4, 2023
# [8.6.0-next.13](v8.6.0-next.12...v8.6.0-next.13) (2023-03-04) ### Performance Improvements * **docker:** build executable ([#764](#764)) ([af2dbce](af2dbce)) [skip ci]
kanadgupta
pushed a commit
that referenced
this pull request
Mar 29, 2023
# [8.6.0](v8.5.0...v8.6.0) (2023-03-29) ### Bug Fixes * bad merge ([e15c574](e15c574)) * bump node version in release workflow ([7f3158f](7f3158f)) * does this work? ([c81e432](c81e432)) * memory leak in large file handling within openapi-parser ([#784](#784)) ([1b1cc00](1b1cc00)) * next channel ([ce4e494](ce4e494)) * **openapi:** yaml strings would be improperly parsed as Date objects ([#779](#779)) ([72e75cb](72e75cb)) * rebuild prior to npm publish ([29b9ec6](29b9ec6)) * reformat github release header ([38c5625](38c5625)) * reformat header again ([bd2e1a2](bd2e1a2)) * remove some of the package scripts ([3eb52fd](3eb52fd)) * remove unnecessary config ([c22889c](c22889c)) * run tests but NOT release workflow on release commits ([24f885e](24f885e)) * temporarily disable release workflow ([a935268](a935268)) * try rearranging steps like this ([cac0c1d](cac0c1d)) * try this approach to lifecycle events ([4e5ecff](4e5ecff)) * try this as an alternative to @semantic-release/github ([8c343a0](8c343a0)) * try this to see if branch protections work ([f314c3f](f314c3f)) * turns out these rules weren't redundant ([f9f82f1](f9f82f1)) * upgrading `oas-normalize` to move to our `postman-to-openapi` fork ([#776](#776)) ([ee8ce0a](ee8ce0a)) ### Features * add git + changelog plugins ([85e4bfd](85e4bfd)) * container registry ([#777](#777)) ([d193416](d193416)), closes [/github.com//pull/777#discussion_r1145516673](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145516673) [/github.com//pull/777#discussion_r1145528308](https://github.com//github.com/readmeio/rdme/pull/777/issues/discussion_r1145528308) * docker (again) ([#763](#763)) ([2144572](2144572)), closes [#746](#746) * empty commit to trigger release ([3e3c112](3e3c112)) * fix comment ([076cfbf](076cfbf)) ### Performance Improvements * **docker:** build executable ([#764](#764)) ([af2dbce](af2dbce)) ### Reverts * Revert "feat: drop duplicative tag" ([f9fe6c6](f9fe6c6)) * bring workflow name back ([c07495a](c07495a)) * don't set header for changelog ([194489e](194489e)) * restore release workflow ([9f6bbc9](9f6bbc9)) * ugh here we go again ([0b1e429](0b1e429)) [skip ci]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🧰 Changes
I initially opened this PR with the goal of automatically publishing these docker images to the GitHub Container Registry, but in testing it I discovered that these images were so large that the GitHub Action time savings were basically a wash (the benefits were only realized in workflows that ran
rdme
more than once due to the image caching).I decided to try and use this PR to instead optimize our images as much as possible, so now we create an executable using
pkg
and create a tiny image that only runs that. Was able to reduce our image size by ~90% 🥳 the build time is higher now, but once we publish to the registry our users shouldn't have to deal with that.Old image size: 639.63267 MB
New image size1: 71.004255 MB 📉
🧬 QA & Testing
If the GitHub Action dry runs continue to work, we should be good to go!
Footnotes
This is the size of the image when I built it on my Mac but I imagine the GitHub Action runner image is roughly the same? ↩