Cannot save image using podman
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
Did anyone know how to fix this issue.
Here are the example that are working:
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
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
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
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"...
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)