-
Notifications
You must be signed in to change notification settings - Fork 696
Add two fields for images exported from containers #3895
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
base: master
Are you sure you want to change the base?
Conversation
The original container image has some optional metadata in the ENTRYPOINT and STOPSIGNAL fields, that could be needed later... But these are not exported in the generic rootfs, by default. Make it possible to pass these at runtime, for instance to select between OpenRC and systemd - or SIGTERM and systemd. Some drivers include their config in the rootfs, like wsl.conf. Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ptobably these should be incubated as VMOpts entries.
vmOpts:
container:
entrypoint: foo
They are specific to the image, depending on their "init" Currently it is only implemented by wsl.conf, for WSL2 : https://learn.microsoft.com/en-us/windows/wsl/wsl-config
[boot]
systemd=true But I would rather not have to modify each rootfs image. |
I don't understand why the filenames need to be configurable; they can be hardwired, like all the other files in the instance directory. And I also don't understand why this needs to be configurable. Why don't we always write the entrypoint and stopsignal to the corresponding files? If the driver doesn't need them, then it could ignore them. |
The filenames are hardcoded, it is the content that is configurable. Similar to the already existing (underdocumented) The driver would just pass to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
Thanks, I misread the diff. @AkihiroSuda I agree with @afbjorklund that these settings should be defined with the image, next to the I.e. they would be included in the |
The original container image has some optional metadata in the ENTRYPOINT and STOPSIGNAL fields, that could be needed later...
But these are not exported in the generic rootfs, by default.
Make it possible to pass these at runtime, for instance to select between OpenRC and systemd - or SIGTERM and systemd.
Some drivers include their config in the rootfs, like wsl.conf.
Required by: (currently hardcoded)
Example for systemd
Where /sbin/init was symlinked over to /lib/systemd/systemd
STOPSIGNAL SIGRTMIN+3
The defaults are to run either with the VM's
init
, or with--init
And to use acpi or similar for VMs, or SIGTERM for containers