-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Switch kernel build to linuxkit pkg
#2583
Comments
|
👍
Good idea, lets have the tool read an array of build args from a That seems less open to abuse or mistakes (such as not putting the command invocation line in git and therefore missing it in the hash) than a CLI option, although maybe we will eventually find a use case for that too.
Will have to think on this one some more. Perhaps if I do so for long enough the bug will be fixed ;-) (is there an issue on moby/moby for it?), Perhaps we can just generate |
|
It is valid to do e.g.
Which is a shame. Even if it did work I expect there would be some chance it would also be incompatible with DCT. |
Taking a stab at this. One other problem with the kernel build, not yet mentioned above, is also that we currently have to rebuild all kernels even if we only change a subset of the kernels because the git tree hash changes for all kernels. Given the number of kernels we have, this is getting a bit tedious as well. We already have added So here is a proposal for a new directory layout. Basically every linuxkit package built as part of the kernel build gets its own directory and some shared files are in the top level directory. Something like this:
For this to work we need a few additional improvements to
With the above
And
The The
Note 1: The above layout and proposal now has the same kernel version repeated in quite a few Note 2: With the proposal the hash for the @ijc it would good if you could comment on this proposal. |
Overall looks good. The repetition of the versions you mention could be resolved by having e.g. The I wonder if adding support for multi-stage builds to |
I think this is a good idea. Same dir, different
I like this. Definitely better than the special value hack which I wasn't too happy with in the first place.
That might be a good idea for |
I don't think that has to be the case, it would just mean some of them had some redundant or unnecessary entries, I guess. The multi-stage target thing would have the same effect I guess. |
Once moby/moby#2578 is put to bed I'd like to convert the kernel build over.
Looking at
kernel/Makefile
I can see 4 possible issues which may need enhancements tolinuxkit pkg
.linuxkit pkg
against either a statically or automatically generatedbuild-foo.yml
.--build-arg
. Should be simple enough to add a similar argument tolinuxkit pkg build
(andpush
) which is propagated to the build.docker push
andpush-manifest
more than once. This is because it builds and pusheslinuxkit/kernel:X.Y.Z$(EXTRA)-$(TAG)
by default (X.Y.Z
is the kernel version,$(EXTRA)
is an optional per image suffix like-dbg
,$(TAG)
is the usual tree-sh and-dirty
suffix) but also tags and pusheslinuxkit/kernel:X.Y.Z$(EXTRA)
(no hash). This differs from the usual pattern oflinuxkit/pkg:$(TAG)
. For this we could add a new field to thebuild.yml
calledtag: foo
wherefoo
here would beX.Y.Z$(EXTRA)
(per-kernel). If this field is set then the build/push will be of bothfoo-$(TAG)
andfoo
(but not the default$(TAG)
. Other names such asalias
orprefix
might be tempting but don't seem to match the semantics (in particular because the "default" name is not used so it is neither an alias nor is it strictly a prefix).perf
,zfs
) which use the just-now-built kernel image. I think thebuild-arg
stuff above handles that?/cc @rn any of that sound insane? Any other wrinkles with the kernel build I've missed?
The text was updated successfully, but these errors were encountered: