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

Build stack images as single layer #129

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Conversation

robdimsdale
Copy link
Member

Summary

This PR builds the stack images as a single layer each, on top of the upstream base layer.

  • we want as few layers as possible, and most of the layers are small and change infrequently so we should not separate them out.
  • making the layers a single layer in the Dockerfile is the easiest way to achieve a minimal number of layers. Tools like crane flatten would also squash the base layer which we prefer to keep separate.

Use Cases

Reducing the number of layers in the stack results in more layers available in builders. Some container runtimes (e.g. docker) have layer limits that Paketo Builders can run into.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

- we want as few layers as possible, and most of the layers are small and change infrequently so we should not separate them out.
- making the layers a single layer in the Dockerfile is the easiest way to achieve a minimal number of layers. Tools like crane flatten would also squash the base layer which we prefer to keep separate.
@robdimsdale robdimsdale requested a review from a team as a code owner July 20, 2023 21:39
@sophiewigmore sophiewigmore merged commit 244823f into main Jul 21, 2023
3 checks passed
@sophiewigmore sophiewigmore deleted the single-layer-stack-images branch July 21, 2023 13:55
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.

None yet

2 participants