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

image build: layer caching #217

Closed
wants to merge 2 commits into from
Closed

Conversation

eguzki
Copy link
Contributor

@eguzki eguzki commented Sep 26, 2023

Trying to reduce the image building time, enable docker layer caching

@eguzki eguzki closed this Sep 27, 2023
@eguzki
Copy link
Contributor Author

eguzki commented Sep 27, 2023

First build: https://github.com/Kuadrant/limitador/actions/runs/6315380975/job/17147791684 3hours

Second build (where cache should be using) https://github.com/Kuadrant/limitador/actions/runs/6318070335/job/17156232704 4 hours

looking at the logs every single layer is being built again

Furthermore, I learned, caching was introduced in buildah 1.27.0 https://github.com/containers/buildah/releases/tag/v1.27.0

and redhat-actions/buildah-build is using 1.23

/usr/bin/buildah version
  /usr/bin/buildah version
  Version:         1.23.1

redhat-actions/buildah-build#90

What I do not understand is then what is the layers input https://github.com/redhat-actions/buildah-build#action-inputs ?? it says literally: Set to true to cache intermediate layers during the build process.

Next try: Move all images builds to docker/build-and-push action and use the gha cache and only COPY the necessary things into the Dockerfile that are needed for each build (since if the payload is the EXACTLY the same then the layer will be re-used from cache)

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.

1 participant