mirror of
https://github.com/containers/podman.git
synced 2025-06-29 23:22:40 +08:00
Add --os to manifest add
Add --os to manifest add for overriding the os field. Signed-off-by: Qi Wang <qiwan@redhat.com>
This commit is contained in:
@ -19,6 +19,7 @@ type ManifestAddOpts struct {
|
||||
Arch string `json:"arch"`
|
||||
Features []string `json:"features"`
|
||||
Images []string `json:"images"`
|
||||
OS string `json:"os"`
|
||||
OSVersion string `json:"os_version"`
|
||||
Variant string `json:"variant"`
|
||||
}
|
||||
@ -86,6 +87,11 @@ func addManifestToList(ref types.ImageReference, list manifests.List, systemCont
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if opts.OS != "" {
|
||||
if err := list.SetOS(d, opts.OS); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if len(opts.OSVersion) > 0 {
|
||||
if err := list.SetOSVersion(d, opts.OSVersion); err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user