Cannot save image using podman

Latest response

I have an issue to save image in podman.
When the image I want to save is from redhat using this command:
podman save -o testRedHat.tar 53ce4390f2ad

A signature error shown like this:
Getting image source signatures
Checking if image destination supports signatures
Error: Can not copy signatures to docker-archive:testRedHat.tar: Storing signatures for docker tar files is not supported

This is the image id:
registry.access.redhat.com/ubi8 latest 53ce4390f2ad 5 weeks ago 233 MB

test

Did anyone know how to fix this issue.

Here are the example that are working:
tes2

test1

Thanks.

Responses

Hi Ryant,

Not exactly sure what you mean ... but when you want to save a container as an image, you can use the podman export option. :)

Here is an example :

podman pull registry.redhat.io/ubi8/ubi-micro

podman run --name <container-name> -it registry.redhat.io/ubi8/ubi-micro /usr/bin/bash

buildah commit <container-name> localhost/<container-image-name>:latest

podman export <container-image-name> -o /path-where-to-store/<container-image-name>.tar  

Regards,
Christian

Thanks Christian for the response.

Well actually what i mean is to save an image to a .tar file using podman save.

But unfortunately an error occures. this is an example.

[gryant@redhat ~]$ podman images REPOSITORY TAG IMAGE ID CREATED SIZE registry.redhat.io/rhel8/rsyslog latest 7f6b1d2747d6 5 weeks ago 255 MB registry.access.redhat.com/ubi8 latest 53ce4390f2ad 5 weeks ago 233 MB docker.io/aaronstrouse1/ubi8 latest ca53053fa8ed 6 months ago 272 MB [gryant@redhat ~]$ podman save -o test.tar 53ce4390f2ad Getting image source signatures Checking if image destination supports signatures Error: Can not copy signatures to docker-archive:test.tar: Storing signatures for docker tar files is not supported [gryant@redhat ~]$

Hi Ryant,

Why using podman save when podman export does what you want (save an image to a .tar file) ?
Well, maybe I still don't understand exactly what you mean ... :)

Regards,
Christian

Because i only have the image and did not make a container. This is the example (https://access.redhat.com/sites/default/files/images/screenshot_2021-10-22_084552.png).

I can save image when using image from docker and cannot save image when using image from redhat.

I already update an image in my first post.

Hi Ryant,

Not sure why one wants to do that, it is recommended to always use the latest image for security
reasons. If you export the container image (without modifying anything before), and then import
back that very image, you have the "old image" - and can build a new container on top with it ... :)

Regards,
Christian

Sorry to bother you Christian.

I do this step because I follow this tutorial and it works (https://learning.oreilly.com/videos/red-hat-certified/9780137442058/9780137442058-RHS1_01_03_06/#). So its weird that in my environment did not work. I updated the example from the tutorial.

Sorry again because I am still new to this stuff.

Hi Ryant,

You definitely don't bother me and there is no reason to be sorry - we gladly try to help and we
all have been "newbies" at some point of time. Unfortunately I have no other idea in this case. :)

Regards,
Christian

Thanks again Christian.

I do think RHEL can update the podman version to the newest version. Because i think they found a solution. https://github.com/containers/podman/pull/11669

Meanwhile i just "skip" this stuff.

Hi Ryant,

You're welcome ! RHEL 8.5 is just around the corner, it's planned to being released in November.
The shipped version in RHEL 8.5 of podman will be 3.3.1 (that's what I see in the Beta at least) ...
Not sure if the solution will be included, but Dan Walsh and his team are known to fix things fast.

Regards,
Christian

it seems like the solution will not be included https://github.com/containers/podman/issues/11718 and we will not be able to save the image layers. I think it is of the RH devops policies.

It looks like me and you are using the same study guide, and on the same day lol. I too am having this issue. I see you saw its a version issue with RHEL and Podman. I guess we should just memorize how to save and load the image. That should suffice.

I agree with Ryant Herwansyah. If you want to locate the image with all the layers - that is not the same with save container. So podman export should not be mentioned the same as podman save - due to the main OCI specification (as the docker export is not the same as docker save)

Hi Christian,

Its working fine thanks buddy

Regards, Parthipan

You're welcome, Parthipan ! :)

Podman save is supposed to work actually on the podman local storage only ...this is what I understand from the official training! Meaning the solution suggested from Christian is the best way to workaround the signature issue!! podman pull, run, commit then save.

Hi, Hussein!

I think that your phrase "actually on the podman local storage" must be corrected or I did not understand it right. As for me I am also interested in the command "podman save..." above. And my command (which is the same) also results the error:

podman save --output ubi8-micro_8.5-744.tar registry.access.redhat.com/ubi8-micro:8.5-744
Error: Can not copy signatures to docker-archive:ubi8-micro_8.5-744.tar: Storing signatures for docker tar files is not supported

Maybe you would say "works only (or probably near so) with non-official images"... Because: 1) After running "podman pull registry.access.redhat.com/ubi8/ubi8-micro:8.5-744" I will have the image files saved locally and so that will be "my podman local storage" (I will not need to fetch any image data remote). And for me that means "it dows not work on the podman local storage" 2) When somebody try to save image to local file by "podman save --output .tar" ==> that is also "the podman local storage"

so that all means that really "sometimes it does not work on the podman local storage"...

re-posted below!

Hi Vasiliy ,

I'm not sure how did you test it and I really don't see any issue with my comment above but i'll be happy if you please elaborate what you don't understand / what is wrong so that I can edit my comment accordingly, what i meant with "actually on the podman local storage" is that the image needs to be 1st pulled and then saved, you can't save an image directly from the redhat reg. directly using podman save.

Anyway i tested it now with your images and it seems working fine:-

# podman pull registry.access.redhat.com/ubi8/ubi-minimal:8.5-230
# podman images
REPOSITORY                                   TAG         IMAGE ID      CREATED       SIZE
registry.access.redhat.com/ubi8/ubi-minimal  8.5-230     398f02fd3cd7  9 days ago    107 MB
# podman save  -o ubi-minimal.tar registry.access.redhat.com/ubi8/ubi-minimal:8.5-230
Copying blob 44f62afd0479 done
Copying blob 87cd41b1f9f8 done
Copying config 398f02fd3c done
Writing manifest to image destination
Storing signatures
# ls -l | grep -i tar
-rw-r--r--. 1 root root 107057152 Feb  5 14:26 ubi-minimal.tar
Another Test:-
# podman pull registry.access.redhat.com/ubi8-micro:8.5-744
Trying to pull registry.access.redhat.com/ubi8-micro:8.5-744...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 4f4fb700ef54 done
Copying blob b6d5e0581b2f done
Copying config a4b6df2ac2 done
Writing manifest to image destination
Storing signatures
a4b6df2ac2dfb315a4edf1c62f4e44c466ca3ad81d8acc4beba31b07daa9fe77
# podman images
REPOSITORY                                   TAG         IMAGE ID      CREATED       SIZE
registry.access.redhat.com/ubi8/ubi-minimal  8.5-230     398f02fd3cd7  9 days ago    107 MB
registry.access.redhat.com/ubi8-micro        8.5-744     a4b6df2ac2df  9 days ago    38.8 MB
# podman save  -o ubi-minimal-8.5-744.tar registry.access.redhat.com/ubi8-micro:8.5-744
Copying blob 5f70bf18a086 done
Copying blob fe7a061dd3ad done
Copying config a4b6df2ac2 done
Writing manifest to image destination
Storing signatures
# ls -l | grep -i tar
-rw-r--r--. 1 root root  38751744 Feb  5 14:31 ubi-minimal-8.5-744.tar
-rw-r--r--. 1 root root 107057152 Feb  5 14:26 ubi-minimal.tar

Using your own command:-

# podman save --output ubi8-micro_8.5-744.tar registry.access.redhat.com/ubi8-micro:8.5-744
Copying blob 5f70bf18a086 done
Copying blob fe7a061dd3ad done
Copying config a4b6df2ac2 done
Writing manifest to image destination
Storing signatures

Rest of commands:-

# ls -l | grep -i tar
-rw-r--r--. 1 root root  38751744 Feb  5 15:02 ubi8-micro_8.5-744.tar
-rw-r--r--. 1 root root  38751744 Feb  5 14:31 ubi-minimal-8.5-744.tar
-rw-r--r--. 1 root root 107057152 Feb  5 14:26 ubi-minimal.tar
# podman version
Version:      3.4.1-dev
API Version:  3.4.1-dev
Go Version:   go1.16.7
Built:        Tue Oct 19 12:11:42 2021
OS/Arch:      linux/amd64

please let me show your podman version/linux release and a snipp of podman images you've maybe we can find where we're mistaken or where the conflict is! Thanks

Hussein, hello and thank you for your feedback! that is my terminal log (host and user cahnged...):

 XXX@UUU  ~  cd /tmp
 XXX@UUU  /tmp  podman pull registry.access.redhat.com/ubi8/ubi-minimal:8.5-230
Trying to pull registry.access.redhat.com/ubi8/ubi-minimal:8.5-230...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 4af7314918ee skipped: already exists  
Copying blob fdf7c3c4a3fe [--------------------------------------] 0.0b / 0.0b
Copying config 398f02fd3c done  
Writing manifest to image destination
Storing signatures
398f02fd3cd7ab7d779da986d5fc83d15a3aecd5a51a895221a2953420be4a26
 XXX@UUU  /tmp  podman images
REPOSITORY                                   TAG         IMAGE ID      CREATED       SIZE
registry.access.redhat.com/ubi8/ubi-init     8.5-10      8cb83279f877  9 days ago    253 MB
registry.access.redhat.com/ubi8              8.5-226     b81e86a2cb9a  9 days ago    235 MB
registry.access.redhat.com/ubi8/ubi-minimal  8.5-230     398f02fd3cd7  9 days ago    107 MB
registry.access.redhat.com/ubi8-minimal      8.5-230     398f02fd3cd7  9 days ago    107 MB
registry.access.redhat.com/ubi8-micro        8.5-744     a4b6df2ac2df  9 days ago    38.8 MB
 XXX@UUU  /tmp  podman save  -o ubi-minimal.tar registry.access.redhat.com/ubi8/ubi-minimal:8.5-230
Getting image source signatures
Checking if image destination supports signatures
Error: Can not copy signatures to docker-archive:ubi-minimal.tar: Storing signatures for docker tar files is not supported
 ✘ XXX@UUU  /tmp  podman version
Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.7
Built:        Tue Sep 21 11:41:42 2021
OS/Arch:      linux/amd64
 XXX@UUU  /tmp  

and my cat /proc/version

Linux version 4.18.0-348.el8.x86_64 (mockbuild@x86-vm-09.build.eng.bos.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-3) (GCC)) #1 SMP Mon Oct 4 12:17:22 EDT 2021

and ...maybe it is of my podman version that is not *-dev. i will try it later because now I have to use docker and podman together what is not so comfortable for me as I would like to use one only tool without daemon. And it is podman :)

Hi I think the issue might be on your machine, check these URLs to verify image signing for Red Hat Container Registry :

[Red Hat Customer Portal](https://access.redhat.com/articles/3116561)
[bugzilla](https://bugzilla.redhat.com/show_bug.cgi?id=1633482)
[developers](https://developers.redhat.com/blog/2019/10/29/verifying-signatures-of-red-hat-container-images)

me too the same issue. used os el8.5. podmanversion:3.3.1