NAME¶ 名称
podman-image-scp - Securely copy an image from one host to another
podman-image-scp - 安全地从一个主机复制镜像到另一个主机
SYNOPSIS¶ 概要
podman image scp [options] name[:tag]
podman image scp [选项] 名称[:标签]
DESCRIPTION¶ 描述
podman image scp copies container images between hosts on a network. This command can copy images to the remote host or from the remote host as well as between two remote hosts.
Note: ::
is used to specify the image name depending on Podman is saving or loading. Images can also be transferred from rootful to rootless storage on the same machine without using sshd. This feature is not supported on the remote client, including Mac and Windows (excluding WSL2) machines.
podman image scp 在网络上的主机之间复制容器镜像。此命令可以将镜像复制到远程主机或从远程主机复制,也可以在两个远程主机之间复制。注意: ::
用于根据 Podman 正在保存或加载的镜像名称。镜像还可以在同一台机器上从 rootful 转移到 rootless 存储,而无需使用 sshd。此功能不受远程客户端支持,包括 Mac 和 Windows(不包括 WSL2)机器。
podman image scp [GLOBAL OPTIONS]
podman image scp [全局选项]
podman image scp [OPTIONS] NAME[:TAG] [HOSTNAME::]
podman image scp [选项] 名称[:标签] [主机名::]
podman image scp [OPTIONS] [HOSTNAME::]IMAGENAME
podman image scp [选项] [主机名::]镜像名称
podman image scp [OPTIONS] [HOSTNAME::]IMAGENAME [HOSTNAME::]
OPTIONS¶ 选项
--help, -h¶ --help,-h ¶
Print usage statement 打印使用说明
--quiet, -q¶
Suppress the output 抑制输出
EXAMPLES¶ 示例
Copy specified image to local storage:
将指定的镜像复制到本地存储:
$ podman image scp alpine
Loaded image: docker.io/library/alpine:latest
Copy specified image from local storage to remote connection:
从本地存储复制指定图像到远程连接:
$ podman image scp alpine Fedora::/home/charliedoern/Documents/alpine
Getting image source signatures
Copying blob 72e830a4dff5 done
Copying config 85f9dc67c7 done
Writing manifest to image destination
Storing signatures
Loaded image: docker.io/library/alpine:latest
Copy specified image from remote connection to remote connection:
从远程连接复制指定图像到远程连接:
$ podman image scp Fedora::alpine RHEL::
Loaded image: docker.io/library/alpine:latest
Copy specified image via ssh to local storage:
通过 SSH 将指定图像复制到本地存储:
$ podman image scp charliedoern@192.168.68.126:22/run/user/1000/podman/podman.sock::alpine
WARN[0000] Unknown connection name given. Please use system connection add to specify the default remote socket location
Getting image source signatures
Copying blob 9450ef9feb15 [--------------------------------------] 0.0b / 0.0b
Copying config 1f97f0559c done
Writing manifest to image destination
Storing signatures
Loaded image: docker.io/library/alpine:latest
Copy specified image from root account to user accounts local storage:
将指定的镜像从根帐户复制到用户帐户的本地存储:
$ sudo podman image scp root@localhost::alpine username@localhost::
Copying blob e2eb06d8af82 done
Copying config 696d33ca15 done
Writing manifest to image destination
Storing signatures
Getting image source signatures
Copying blob 5eb901baf107 skipped: already exists
Copying config 696d33ca15 done
Writing manifest to image destination
Storing signatures
Loaded image: docker.io/library/alpine:latest
Copy specified image from root account to local storage:
将指定的镜像从根帐户复制到本地存储:
$ sudo podman image scp root@localhost::alpine
Copying blob e2eb06d8af82 done
Copying config 696d33ca15 done
Writing manifest to image destination
Storing signatures
Getting image source signatures
Copying blob 5eb901baf107
Copying config 696d33ca15 done
Writing manifest to image destination
Storing signatures
Loaded image: docker.io/library/alpine:latest
SEE ALSO¶ 参见 ¶
podman(1), podman-load(1), podman-save(1), podman-remote(1), podman-system-connection-add(1), containers.conf(5), containers-transports(5)
HISTORY¶ 历史 ¶
July 2021, Originally written by Charlie Doern cdoern@redhat.com
2021 年 7 月,原文作者为 Charlie Doern cdoern@redhat.com