Migration from docker to podman after upgrade


#1

I recently upgraded from F28 atomic workstation to F29 silverblue. I had a few containers I want to pull forward and make available in my unprivileged account… The instructions on the release notes page involve a sudo skopeo copy command, which copies old images to the new root-only storage space in /var/run/containers/storage.

“sudo podman images” shows that the images are there, but “podman images” as me shows nothing.

Repeating the skopeo command without the sudo fails becuase my unprivileged account has no permissions in /var/run/containers/storage. Repeating the skopeo command without the sudo and with an oci target fails because I have no permissions to connect to the docker daemon.

I have not found any target which will cause skopeo to store the image in my unprivileged image cache. Since running as an unprivileged user is the big thing skopeo/podman/buildah are supposed to accomplish, there has to be a means of copying my former docker containers into my unprivileged user space. Doesn’t there? What am I missing?


#2

This is simply because it’s using rootless podman, which uses different storage from root podman.

What’s the exact command you’re running? Are you in the docker group?


#3

For copying images from priviledged docker or podman, I found the most direct way is to use docker|podman save and then podman import. In the example below, I save an image from my privileged podman container storage and import it into my unprivileged podman storage. It should work the same way when using docker save.

$ pwd
/home/miabbott

$ podman images
REPOSITORY                                                          TAG      IMAGE ID       CREATED       SIZE

$ sudo podman images | grep antora
docker.io/antora/antora                                                         latest   82d09f18b681   2 months ago   177MB

$ sudo podman save -o antora.tar docker.io/antora/antora:latest
Getting image source signatures
Copying blob sha256:df64d3292fd6194b7865d7326af5255db6d81e9df29f48adde61a918fbd8c332
 4.46 MB / 4.46 MB [========================================================] 0s
Copying blob sha256:7aa09d2ca0a3027a3059f57e707d7465248345d0a7495e223b19214f2b44be22
 57.13 MB / 57.13 MB [======================================================] 0s
Copying blob sha256:8b59e4cead98eb861677c9897dffd64e074a964a8c887942b613bad1ec796404
 4.35 MB / 4.35 MB [========================================================] 0s
Copying blob sha256:ea3b34893001b113cb5a8104063d5d199b18d79502f72e7d4920dd95f4d9f7d1
 103.10 MB / 103.10 MB [====================================================] 1s
Copying blob sha256:696e93e3e76bfaee0bb9cb3e12a7898fc128eada0bb6ba8d10348fa4896902dd
 2.00 KB / 2.00 KB [========================================================] 0s
Copying config sha256:82d09f18b6813c68c5c44d04c688c3d612dc5cfc83f8a8e93a3405a04557eaab
 6.29 KB / 6.29 KB [========================================================] 0s
Writing manifest to image destination
Storing signatures

$ ls -l antora*
-rw-r--r--. 1 root root 177275392 Dec 10 09:24 antora.tar

$ podman import antora.tar docker.io/antora/antora:latest
Getting image source signatures
Copying blob sha256:ce7811da37eb9d4732e1e508793d20e619b78f20b9a27b54a3e7373f0a8e1327
 169.06 MB / 169.06 MB [====================================================] 1s
Copying config sha256:1c84eb53ef891b42fdfeac4b704b9eaa5af0840afce98ff55fc9fa0e49836bfa
 419 B / 419 B [============================================================] 0s
Writing manifest to image destination
Storing signatures
1c84eb53ef891b42fdfeac4b704b9eaa5af0840afce98ff55fc9fa0e49836bfa

$ podman images
REPOSITORY                                                          TAG      IMAGE ID       CREATED          SIZE
docker.io/antora/antora                                             latest   1c84eb53ef89   27 seconds ago   177MB

#4

I posted a PR to the release notes with the same instructions above:

https://pagure.io/fedora-docs/silverblue/pull-request/27


#5

Thanks! That’ll do it.