toolbox: handle OCI images (as produced by Kiwi)

We changed to building toolbox container images with Kiwi. These
are OCI archives, not docker archives. So we need to call skopeo
appropriately.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-03-14 14:34:38 -07:00
parent 4ee74a0bca
commit dc7ff01f27
1 changed files with 2 additions and 2 deletions

View File

@ -27,8 +27,8 @@ sub run {
assert_script_run "curl -o /var/tmp/toolbox.tar.gz $image", 300; assert_script_run "curl -o /var/tmp/toolbox.tar.gz $image", 300;
# this registers the downloaded image such that `toolbox create` # this registers the downloaded image such that `toolbox create`
# will use it, rather than downloading one. it takes a while # will use it, rather than downloading one. it takes a while
my $format = $image =~ "oci" ? "oci-archive" : "docker-archive";
assert_script_run "skopeo copy docker-archive:/var/tmp/toolbox.tar.gz containers-storage:registry.fedoraproject.org/fedora-toolbox:$relnum", 600; assert_script_run "skopeo copy $format:/var/tmp/toolbox.tar.gz containers-storage:registry.fedoraproject.org/fedora-toolbox:$relnum", 600;
# we do not pass -y this time as we do not want to allow a # we do not pass -y this time as we do not want to allow a
# download, if toolbox wants to do one, something has gone # download, if toolbox wants to do one, something has gone
# wrong. unfortunately there is no -n so we just have to let # wrong. unfortunately there is no -n so we just have to let