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

docker: make None the last layer group #1370

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

pawitp
Copy link
Contributor

@pawitp pawitp commented Oct 4, 2020

Currently, if a user adds additional artifact to the Docker build
without modifying dockerGroupLayers, the artifact will have "None"
grouping and be put as the first layer in the output.

These additional artifacts are often configuration or supporting
assets. Making this the zeroth layer by default causes dependency
layer to not be re-used if any of these artifacts are changed.

Since not all users will care to modify dockerGroupLayers, the
default should be to make it such that adding additional artifact
does not break re-use of the dependency layer.

Currently, if a user adds additional artifact to the Docker build
without modifying dockerGroupLayers, the artifact will have "None"
grouping and be put as the first layer in the output.

These additional artifacts are often configuration or supporting
assets. Making this the zeroth layer by default causes dependency
layer to not be re-used if any of these artifacts are changed.

Since not all users will care to modify dockerGroupLayers, the
default should be to make it such that adding additional artifact
does not break re-use of the dependency layer.
@lightbend-cla-validator
Copy link

Hi @pawitp,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

https://www.lightbend.com/contribute/cla

@muuki88 muuki88 added the docker label Oct 4, 2020
Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this improvement! ❤️

Totally makes sense to have this order in this way.

@muuki88 muuki88 merged commit 2e77328 into sbt:master Oct 5, 2020
@muuki88
Copy link
Contributor

muuki88 commented Oct 5, 2020

1.7.6 is on its way

@pawitp pawitp deleted the improve-layer-group branch October 6, 2020 12:51
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.

3 participants