-
Notifications
You must be signed in to change notification settings - Fork 44
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
layers
argument of makeContainerImage is incorrectly named
#1221
Comments
Hi @Ten0, You are right about this. Aside from the naming convention issue, I would also like to take a look at how
I wonder if this approach is optimal as the last layer ends up with most derivations. |
I don't know that this has changed, it's probably still the same (documentation doesn't specify any more complex behavior at least). At NixCon 2022 there was somebody talking about an alternative to the standard image builder (that is specifically designed to not re-build layers that were already pushed to the remote repository) and whose closing words were about improving the layering algorithm : nix2container. Maybe they have implemented that now? (In any case using that to push images seems essential in a large monorepo if one wants to not re-build the tar stream of all already-pushed layers at every deployment so I'm guessing that would be a great addition to this project) I guess the optimal algorithm would take into account all images that need to be built to try and do the best factoring of all the images. |
One of the things makes tries to get rid of is having to deal with many different containers (building and deploying them). We prefer using the makes container itself, point to the repository we want to use, and do both provisioning and execution in runtime. Instead of building a container for we just do:
|
Aah I see, that's a very interesting approach! |
As mentioned in #502, we will no longer be supporting specific-purpose builtins. Instead of creating a wrapper around |
makes/src/args/make-container-image/default.nix
Lines 10 to 26 in 965820b
contents
is a set of derivations that have to somehow be put in the final image, but it is not specified that every such content should be a layer.Instead, constrained by
maxLayers
, layers will most likely be generated from the set ofcontents
in such a way that one layer may contain several derivations, following this algorithm, but also a singlecontent
may be split in several layers, at most one per derivation.=> It appears that the
layers
argument is misleading. It should instead probably propagate the naming suggested bynixpkgs
, that is:contents
.The current naming is confusing: one has to wonder how the
maxLayers
argument interacts with thelayers
argument.The text was updated successfully, but these errors were encountered: