Skip to content

Reduce Dockerfile build time by referencing prebuilt image #138

Open
@mrfelton

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions