Skip to content
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

Container size reduction #203

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Container size reduction #203

merged 1 commit into from
Apr 8, 2024

Conversation

rdash99
Copy link
Contributor

@rdash99 rdash99 commented Apr 5, 2024

Related Issue

#202

Description

This changes the Dockerfile to reduce the built container size to 297MB - reducing the pull time significantly. This also leads to less layers and hopefully less compression which was one of the major slowdowns for extracting after download.

* feat: reduce container built size

* test: trigger CI

* chore(deps): bump node to v20.11.0

* Revert "test: trigger CI"

This reverts commit 16f2360.

* refactor: modify dockerfile

* feat: add git
@codfish
Copy link
Owner

codfish commented Apr 5, 2024

hey @rdash99, did you mean to close? I was testing as we speak. Was there an issue you found with the optimization?

@rdash99
Copy link
Contributor Author

rdash99 commented Apr 5, 2024

Nope sorry - I was trying to squash my commits down and mangled it

@rdash99 rdash99 reopened this Apr 5, 2024
@rdash99
Copy link
Contributor Author

rdash99 commented Apr 5, 2024

I think it should be good to go now - apologies for any confusion

@codfish
Copy link
Owner

codfish commented Apr 5, 2024

@rdash99 I'm going to definitely test and accept this optimization if it works well! Just wanted to give you a heads up though, the following is the suggested way to use it:

https://github.com/codfish/semantic-release-action?tab=readme-ov-file#which-version-to-use

  # Recommended: Docker image digest from GitHub Container Registry (best for speed & security)
  - uses: docker://ghcr.io/codfish/semantic-release-action@sha256:9e0bbcc4ca3b3611668dcf911e51432573efb3222587c4ca1cc8a759c1b8283c

when you do this, your workflow doesn't need to build the image, they just pull it so it should be little faster. Should theoretically be even faster after your change too

@rdash99
Copy link
Contributor Author

rdash99 commented Apr 5, 2024

We currently do use that style in our actual workflows but we currently point to a cached version of the container on our own infrastructure to try to speed up pulls as much as possible as pulling the container has been one of the slowest parts of our actions runs generally.

@rdash99
Copy link
Contributor Author

rdash99 commented Apr 5, 2024

I was testing this in our repo where we host our workflows today and felt it would be a potential contribution :)

@codfish codfish merged commit f93cffb into codfish:main Apr 8, 2024
0 of 2 checks passed
Copy link

github-actions bot commented Apr 8, 2024

🎉 This PR is included in version 3.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@codfish
Copy link
Owner

codfish commented Apr 8, 2024

@rdash99 thanks again! just merged and updated, latest version has a digest of sha256:e97235f7e14add2994d6738df6a31a874c184e77da325688c37570dd8382e989 (updated in the readme as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants