summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/images.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/images.go')
-rw-r--r--pkg/varlinkapi/images.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 210f139ce..0ca867410 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -54,6 +54,7 @@ func (i *LibpodAPI) ListImages(call iopodman.VarlinkCall) error {
i := iopodman.Image{
Id: image.ID(),
+ Digest: string(image.Digest()),
ParentId: image.Parent,
RepoTags: image.Names(),
RepoDigests: repoDigests,
@@ -514,7 +515,11 @@ func (i *LibpodAPI) Commit(call iopodman.VarlinkCall, name, imageName string, ch
if err != nil {
return call.ReplyContainerNotFound(name, err.Error())
}
- sc := image.GetSystemContext(i.Runtime.GetConfig().SignaturePolicyPath, "", false)
+ rtc, err := i.Runtime.GetConfig()
+ if err != nil {
+ return call.ReplyErrorOccurred(err.Error())
+ }
+ sc := image.GetSystemContext(rtc.SignaturePolicyPath, "", false)
var mimeType string
switch manifestType {
case "oci", "": //nolint
@@ -525,7 +530,7 @@ func (i *LibpodAPI) Commit(call iopodman.VarlinkCall, name, imageName string, ch
return call.ReplyErrorOccurred(fmt.Sprintf("unrecognized image format %q", manifestType))
}
coptions := buildah.CommitOptions{
- SignaturePolicyPath: i.Runtime.GetConfig().SignaturePolicyPath,
+ SignaturePolicyPath: rtc.SignaturePolicyPath,
ReportWriter: nil,
SystemContext: sc,
PreferredManifestType: mimeType,