crane 容器镜像管理工具


https://github.com/google/go-containerregistry/releases/download/v0.19.1/go-containerregistry_Linux_x86_64.tar.gz

crane auth 登录或访问凭证
crane delete 从其注册表中删除一个镜像引用
crane digest 获取一个镜像的摘要
crane ls 列出 repo 中的标签
crane manifest 获取一个镜像的清单
crane pull 通过引用提取远程镜像并将其内容存储在本地
crane push 将本地镜像内容推送至远程注册表

 

查看镜像清单

麒麟: crane manifest --insecure nginx:latest | jq

 

[root@master1 ~]# crane manifest nginx:latest | jq
{
  "manifests": [
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "amd64",
        "org.opencontainers.image.base.digest": "sha256:911821c26cc366231183098f489068afff2d55cf56911cb5b7bd32796538dfe1",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T15:52:03Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:1445eb9c6dc5e9619346c836ef6fbd6a95092e4663f27dcfce116f051cdbd232",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "amd64",
        "os": "linux"
      },
      "size": 2295
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "amd64",
        "vnd.docker.reference.digest": "sha256:1445eb9c6dc5e9619346c836ef6fbd6a95092e4663f27dcfce116f051cdbd232",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:c36751d7f6324d496c55c7fae626cda3efcc62b11a3b6cfb28d5ae53d8d6fc7a",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm32v5",
        "org.opencontainers.image.base.digest": "sha256:ebb104c7880d3fa5343497f453e4c3841a6f0f7ea32a965cd90c47502e8f5b15",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T15:56:32Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:22eb8445007f34b18a7cf095cf908c8e860eed5603dc67adb8f00dd6798a29c7",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "arm",
        "os": "linux",
        "variant": "v5"
      },
      "size": 2297
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm32v5",
        "vnd.docker.reference.digest": "sha256:22eb8445007f34b18a7cf095cf908c8e860eed5603dc67adb8f00dd6798a29c7",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:99074ba8e492ff36acabd507e3d7fb90dfa8fca681acc902f32fc361932e95ee",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm32v7",
        "org.opencontainers.image.base.digest": "sha256:9498c3b6d064c51d3df86cea9b2f096d1242ed325ab420487df42a1f68b43066",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T16:09:07Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:4e7976cb5bc3c30427ede548b334731c094e4d95c6adcc0c9816bbf1dab8b90b",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "arm",
        "os": "linux",
        "variant": "v7"
      },
      "size": 2297
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm32v7",
        "vnd.docker.reference.digest": "sha256:4e7976cb5bc3c30427ede548b334731c094e4d95c6adcc0c9816bbf1dab8b90b",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:4e599602c0e874dddd79bae8f6aa3ca794317c377695f6d4fa5fdd0556abd74c",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm64v8",
        "org.opencontainers.image.base.digest": "sha256:6dc38501802c1554f0fd858d1153a6f0e18c71006c6d0b31cf19fa778900e658",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T18:50:53Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:376fd353c42490331efc37917f104e157fc8c74f443eae9be6e889a29154a236",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "arm64",
        "os": "linux",
        "variant": "v8"
      },
      "size": 2297
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "arm64v8",
        "vnd.docker.reference.digest": "sha256:376fd353c42490331efc37917f104e157fc8c74f443eae9be6e889a29154a236",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:931d823d13a4d753de32d6e782c758ac754720e6f64a9ecd12c23003790868ff",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "i386",
        "org.opencontainers.image.base.digest": "sha256:b8ff4eb084463bc8a819f32cfd5faf2f1cbf8e5ff98f52e8ad8469651ba5508d",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T15:52:03Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:9e52f6bb9e6288806c0ff6df543d3cfe51da20b5b61851bcaa8dc7460525a369",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "386",
        "os": "linux"
      },
      "size": 2294
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "i386",
        "vnd.docker.reference.digest": "sha256:9e52f6bb9e6288806c0ff6df543d3cfe51da20b5b61851bcaa8dc7460525a369",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:d0f75213e5ff64ba3bb6d4dbe83d2460aa3ed789b51e10aeb717dfa815ee2556",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "mips64le",
        "org.opencontainers.image.base.digest": "sha256:2aad38a708c2c935b648b93a2a4d85fcf9ab1b4d5575ffc308536051f79bef55",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T15:56:38Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:fa0c8220c8f03f893e5812b643ff046f277c4e90f31dd1f14fc888208c9e3784",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "mips64le",
        "os": "linux"
      },
      "size": 2298
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "mips64le",
        "vnd.docker.reference.digest": "sha256:fa0c8220c8f03f893e5812b643ff046f277c4e90f31dd1f14fc888208c9e3784",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:90392e966edbad7cdd2d67ae1dd1ff7f8657e856b366ea5dfc041850188da9bf",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 567
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "ppc64le",
        "org.opencontainers.image.base.digest": "sha256:1ab5eca92e8a93dfd55e6e4146c5ec90aba431562750faf65bb9142c0b2fd07f",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T16:09:06Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:d5080b27777a5084386ffe42991b9efb814fcbb96f775478bde14e977e800807",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "ppc64le",
        "os": "linux"
      },
      "size": 2297
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "ppc64le",
        "vnd.docker.reference.digest": "sha256:d5080b27777a5084386ffe42991b9efb814fcbb96f775478bde14e977e800807",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:3f8e1c9afb8181a8de74cc66e9faea260155a1ea945f50c1bd1c51b1eb6c3733",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "s390x",
        "org.opencontainers.image.base.digest": "sha256:3fd07290955a35342cebcceaad53bac8ff57a404d1e41d951391b63133ecd32e",
        "org.opencontainers.image.base.name": "debian:bookworm-slim",
        "org.opencontainers.image.created": "2024-05-30T16:08:47Z",
        "org.opencontainers.image.revision": "3180cdbec313dc4a9f6dd1109ae66adaf98f11fb",
        "org.opencontainers.image.source": "https://github.com/nginxinc/docker-nginx.git#3180cdbec313dc4a9f6dd1109ae66adaf98f11fb:mainline/debian",
        "org.opencontainers.image.url": "https://hub.docker.com/_/nginx",
        "org.opencontainers.image.version": "1.27.0"
      },
      "digest": "sha256:d2283dea6befc77be9a239197dbc2f0a5fd881a5cf5d7d71aff3cb238e4f2e9e",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "s390x",
        "os": "linux"
      },
      "size": 2295
    },
    {
      "annotations": {
        "com.docker.official-images.bashbrew.arch": "s390x",
        "vnd.docker.reference.digest": "sha256:d2283dea6befc77be9a239197dbc2f0a5fd881a5cf5d7d71aff3cb238e4f2e9e",
        "vnd.docker.reference.type": "attestation-manifest"
      },
      "digest": "sha256:ff464d0a189a64f4707f5835dbce516cd3cc0705f44cdb4a8ce7c191d517d22b",
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "platform": {
        "architecture": "unknown",
        "os": "unknown"
      },
      "size": 841
    }
  ],
  "mediaType": "application/vnd.oci.image.index.v1+json",
  "schemaVersion": 2
}

 

下载 arm64v8 镜像

[root@master1 ~]# docker pull  nginx@sha256:376fd353c42490331efc37917f104e157fc8c74f443eae9be6e889a29154a236

 

posted @ 2024-06-13 09:44  fengjian1585  阅读(154)  评论(0编辑  收藏  举报