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

Reduce Dockerfile build time by referencing prebuilt image #138

Open
mrfelton opened this issue Dec 29, 2024 · 0 comments · May be fixed by #140
Open

Reduce Dockerfile build time by referencing prebuilt image #138

mrfelton opened this issue Dec 29, 2024 · 0 comments · May be fixed by #140

Comments

@mrfelton
Copy link

mrfelton commented Dec 29, 2024

This workflow currently rebuilds the Dockerfile from scratch on every run. This process takes over a minute to complete. We can significantly improve the build time (to just seconds) by referencing a prebuilt Dockerfile image.

Proposed solution:

Build the Docker image, push to your registry, and then reference that.

See actions/container-prebuilt-action (https://github.com/actions/container-prebuilt-action) for one way to do it.

Another way would be to use your prebuilt version as a base image for the Dockerfile in this repo. That would still incur some Dockerfile build time, but it would be a fraction of the time it takes to build the current Dockerfile. Would be more similar to what you do with your other action here https://github.com/launchdarkly/find-code-references/blob/main/Dockerfile

This will dramatically reduce the build time within workflows that leverage this action.

Benefits:

  • Faster workflow execution times
  • Improved efficiency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant