Skip to content

Commit

Permalink
podman-remote send name and tag
Browse files Browse the repository at this point in the history
when loading an image with podman-remote load, we need to send a name and a tag to the endpoint

Fixes: containers#7124

Backported-by: Valentin Rothberg <rothberg@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
  • Loading branch information
baude authored and vrothberg committed Aug 11, 2020
1 parent 729e0aa commit c5646ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/domain/infra/tunnel/images.go
Expand Up @@ -188,7 +188,11 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
return nil, err
}
defer f.Close()
return images.Load(ir.ClientCxt, f, &opts.Name)
ref := opts.Name
if len(opts.Tag) > 0 {
ref += ":" + opts.Tag
}
return images.Load(ir.ClientCxt, f, &ref)
}

func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {
Expand Down
2 changes: 1 addition & 1 deletion test/system/120-load.bats
Expand Up @@ -74,7 +74,7 @@ verify_iid_and_name() {
verify_iid_and_name $img_name
}

@test "podman load - NAME and NAME:TAG arguments work (requires: #2674)" {
@test "podman load - NAME and NAME:TAG arguments work" {
get_iid_and_name
run_podman save $iid -o $archive
run_podman rmi $iid
Expand Down

0 comments on commit c5646ac

Please sign in to comment.