Unlike docker, podman comes with a useful tool to transfer image over network, without the need of any registry, which is podman image scp. This tool will take advantage of ssh connection between machines to transfer images.
To transfer an image to another machine, just use below command
$ podman image scp imagename:tag user@anothermachine::
We can also use this command to transfer the image between different users in one machine
$ podman image scp userA@localhost::imagename:tag userB@localhost::
Or to transfer from root storage to a rootless storage
$ sudo podman image scp root@localhost::imagename:tag nonroot@localhost::
Or vice versa
$ podman image scp imagename:tag root@localhost::
If no destination user is specified, podman transfer to the current user
$ podman image scp userB@localhost::imagename:tag
We can also run the command from remote machine (machineC), to transfer image from machineA to machineB
$ podman image scp user@machineA::imagename:tag user@machineB::
To get more information about this command, use man
$ man podman-image-scp
No comments:
Post a Comment