summaryrefslogtreecommitdiff
path: root/libpod/image/manifests.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-04-24 14:54:30 -0400
committerQi Wang <qiwan@redhat.com>2020-04-24 14:57:56 -0400
commit2f3734b143a6f1d61e396ca221a211b7c487d081 (patch)
tree58c5c6f3effe94a73e2a9ece8d20aeac8a209586 /libpod/image/manifests.go
parent3c3adac52838bc4d2b0fdda2cbb8366c81444728 (diff)
downloadpodman-2f3734b143a6f1d61e396ca221a211b7c487d081.tar.gz
podman-2f3734b143a6f1d61e396ca221a211b7c487d081.tar.bz2
podman-2f3734b143a6f1d61e396ca221a211b7c487d081.zip
Add --os to manifest add
Add --os to manifest add for overriding the os field. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'libpod/image/manifests.go')
-rw-r--r--libpod/image/manifests.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/image/manifests.go b/libpod/image/manifests.go
index 9dbeb4cc5..7ca17f86c 100644
--- a/libpod/image/manifests.go
+++ b/libpod/image/manifests.go
@@ -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