-
Notifications
You must be signed in to change notification settings - Fork 600
support for device entitlement in build and bake #2994
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
Conversation
| flags.StringSliceVar(&options.extraHosts, "add-host", []string{}, `Add a custom host-to-IP mapping (format: "host:ip")`) | ||
|
|
||
| flags.StringSliceVar(&options.allow, "allow", []string{}, `Allow extra privileged entitlement (e.g., "network.host", "security.insecure")`) | ||
| flags.StringArrayVar(&options.allow, "allow", []string{}, `Allow extra privileged entitlement (e.g., "network.host", "security.insecure")`) |
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.
This is technically a breaking change but I think StringSlice was accidental. Alias syntax can not be supported with the slice.
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.
Yes I think it should have been StringArray type in the first place for build. With bake it looks good:
Line 470 in ef73c64
| flags.StringArrayVar(&options.allow, "allow", nil, "Allow build to access specified resources") |
Would need to adapt build push action to ignore comma:
- https://github.com/docker/build-push-action/blob/ca877d9245402d1537745e0e356eab47c3520991/README.md?plain=1#L215
- https://github.com/docker/build-push-action/blob/ca877d9245402d1537745e0e356eab47c3520991/src/context.ts#L49
Looking at https://grep.app/search?regexp=true&q=build.*--allow.*%28security%5C.insecure%7Cnetwork%5C.host%29 it seems people don't use csv values.
There are some in GHA workflows https://grep.app/search?f.path=.github%2Fworkflows%2F®exp=true&q=allow%3A+.*%28security%5C.insecure%7Cnetwork%5C.host%29 but we can manage this in our action.
0dda89d to
c5e65d7
Compare
Allow access to CDI Devices in Buildkit v0.20.0+ for devices that are not automatically allowed to be used by everyone in BuildKit configuration. Signed-off-by: Tonis Tiigi <[email protected]> Signed-off-by: CrazyMax <[email protected]>
c5e65d7 to
0c296fe
Compare
Signed-off-by: CrazyMax <[email protected]>
Buildx side of moby/buildkit#5742
Allow access to CDI Devices in Buildkit v0.20.0+ for devices that are not automatically allowed to be used by everyone in BuildKit configuration.