无法使用 Skopeo 将 docker 镜像复制到 ZOT 注册表

问题描述 投票:0回答:1

我已经按照this文档安装了Zot注册表版本v2.0.1。注册表已成功安装并且我看到它正在运行。现在我想使用 Skopeo 将图像从本地目录复制到 Zot 注册表。为此,我安装了 Skopeo 版本 1.15.0。 现在我正在尝试使用以下命令将 docker 映像从本地目录复制到 Zot 注册表

skopeo copy --debug --insecure-policy --dest-tls-verify=false docker-archive://home/nginx/nginx-docker.tar docker://127.0.0.1:8080/nginx:latest

但是我收到以下错误

DEBU[0000] Checking if we can reuse blob sha256:f703cc7a0e636538ae9767121d6da7501de03437277ef5549459ab886978806d: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking if we can reuse blob sha256:458ecd8dac6739be741006504b1fe187dda55ab9eb124e7cd79d5f1c9bb74975: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking if we can reuse blob sha256:b6663d435f614d8f69f8550221eeb6bd5a71428a7414795304172b9c8fcf50e9: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking if we can reuse blob sha256:c1a9cf18a19777a0a930f5fc83fc7fab1c4eb97ba601341cfc026375b203ff67: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking if we can reuse blob sha256:8d29e380f219d107d99970fa08b6b1b86ab0bb32ac88704a5d628a4a3bbf9726: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking if we can reuse blob sha256:e49d7f89f9f88204bd7d17276b761f3cd69885db7a6a2e77f108952c0d3b855a: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:c1a9cf18a19777a0a930f5fc83fc7fab1c4eb97ba601341cfc026375b203ff67
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:8d29e380f219d107d99970fa08b6b1b86ab0bb32ac88704a5d628a4a3bbf9726
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:f703cc7a0e636538ae9767121d6da7501de03437277ef5549459ab886978806d
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:e49d7f89f9f88204bd7d17276b761f3cd69885db7a6a2e77f108952c0d3b855a
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:b6663d435f614d8f69f8550221eeb6bd5a71428a7414795304172b9c8fcf50e9
DEBU[0000] Checking /v2/library/nginx/blobs/sha256:458ecd8dac6739be741006504b1fe187dda55ab9eb124e7cd79d5f1c9bb74975
DEBU[0000] GET https://127.0.0.1:8080/v2/
DEBU[0000] Ping https://127.0.0.1:8080/v2/ err Get "https://127.0.0.1:8080/v2/": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://127.0.0.1:8080/v2/", Err:(*errors.errorString)(0x10580a540)})
DEBU[0000] GET http://127.0.0.1:8080/v2/
DEBU[0000] Ping http://127.0.0.1:8080/v2/ status 400
DEBU[0000] GET https://127.0.0.1:8080/v1/_ping
DEBU[0000] Ping https://127.0.0.1:8080/v1/_ping err Get "https://127.0.0.1:8080/v1/_ping": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://127.0.0.1:8080/v1/_ping", Err:(*errors.errorString)(0x10580a540)})
DEBU[0000] GET http://127.0.0.1:8080/v1/_ping
DEBU[0000] Ping http://127.0.0.1:8080/v1/_ping status 400
FATA[0000] trying to reuse blob sha256:458ecd8dac6739be741006504b1fe187dda55ab9eb124e7cd79d5f1c9bb74975 at destination: pinging container registry 127.0.0.1:8080: StatusCode: 400, "{\"message\":\"no matching operation was found\"}\n"

我尝试查看 Zot 注册表的日志,但找不到任何内容。由于某些原因,ping 操作效果不佳。有什么帮助吗?

registry skopeo
1个回答
0
投票

zot 是仅限 OCI 的注册表,因此

skopeo copy --format=oci ...

https://zotregistry.dev/latest/user-guides/user-guide-datapath/

© www.soinside.com 2019 - 2024. All rights reserved.