首页 > 其他分享 >crane 容器镜像管理工具

crane 容器镜像管理工具

时间:2024-06-13 09:57:01浏览次数:20  
标签:opencontainers image 管理工具 org 镜像 crane sha256 docker digest


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 将本地镜像内容推送至远程注册表

 

查看镜像清单

[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

 

标签:opencontainers,image,管理工具,org,镜像,crane,sha256,docker,digest
From: https://www.cnblogs.com/fengjian2016/p/18245258

相关文章

  • 【网络安全的神秘世界】2024.6.6 Docker镜像停服?解决最近Docker镜像无法拉取问题
    ......
  • 交换机端口镜像
    交换机端口镜像 网络拓扑图:在SW1上配置命令:<sw1>system-view#进入系统视图[sw1]sysnamesw1#命名sw1[sw1]observe-port1interfaceGigabitEthernet0/0/1#创建观察组1,并将g0/0/1配置为观察端口[sw1]interfaceGigabitEthernet0/0/3#......
  • Docker将运行中容器打包成镜像并保存到本地
    在Docker中,我们可以将正在运行的容器保存为镜像,这样就可以随时随地重新创建相同的容器环境。以下是具体步骤:将运行中的Docker容器保存为镜像首先,我们需要找到正在运行的容器的ID或名称。可以通过运行dockerps命令来查看当前运行的容器列表。然后,使用以下命令将容器保存为镜像......
  • 容器镜像拉取不了,不防试试这个公益镜像仓库
    背景由于许多公开镜像站已不再可用,我们建立了一个公益镜像仓库供大家下载使用。然而,由于镜像仓库的带宽有限,建议用户自行搭建。以下是相关资源和使用方法:Github仓库地址:https://github.com/kubesre/docker-registry-mirrors如果觉得有帮助,请在GitHub上点个⭐️以示鼓励。案例$......
  • 14款测试用例管理工具详解
    14款不错的测试用例管理工具对比:PingCode、TestRAIl、Xray、PractiTest、TricentisqTest、禅道(ZenTao)、Zephyr、Tapd、TestLink、TestCollab、Testin云测、云效(AlibabaCloudEffect)、TeavCloud、FitNesse。在软件开发过程中,测试用例管理工具的使用变得越来越重要。这些工具......
  • 第二章_Docker镜像操作
            Docker运行容器前需要本地存在对应的镜像,如果不存在本地镜像,Docker就会尝试从默认镜像仓库https;//hub,docker,com下载.这是由Docker官方维护的一个公共仓库,可以满足用户的绝大部分需求,用户也可以通过配置来使用自定义的镜像仓库。        下面......
  • Linux下的lvm镜像与快照
    lvm镜像(mirror)(1)划分三个PV,其中2个PV大小要一模一样Disk/dev/sdb:21.5GB,21474836480bytes255heads,63sectors/track,2610cylindersUnits=cylindersof16065*512=8225280bytesSectorsize(logical/physical):512bytes/512bytesI/Osize(m......
  • 【解决了一个小问题】因为镜像证书的问题,golang http client出现错误 `tls: failed to
    作者:张富春(ahfuzhang),转载时请注明作者和引用链接,谢谢!cnblogs博客zhihuGithub公众号:一本正经的瞎扯一个服务使用Docker打包镜像,部署到k8s后出现如下的错误信息:tls:failedtoverifycertificate:x509:certificatesignedbyunknownauthority出错的位置是......
  • SQLynx荣登Web SQL工具ChatGPT推荐榜首,数据库管理工具首选
    近年来,随着互联网技术的迅猛发展,数据库管理工具也在不断进步和创新。作为一种便捷且高效的数据库管理方式,WebSQLIDE工具逐渐成为开发者和数据库管理员的首选。在众多WebSQL工具中,SQLynx凭借其卓越的功能和用户体验,荣登ChatGPT同类推荐榜首,成为市场上的领导者。目录1SQ......
  • 【镜像制作】node.js+pm2的latest版镜像制作
    文章目录简介dockerfile代码简介本司的一些nodejs环境基本都运行在pm2的环境下,pm2是一个node环境下的多进程管理工具,通过pm2可以提升不少性能,管理起来也比较方便。在制作nodejs+pm2镜像时,建议指定版本进行安装,这样可以避免时间一久出现版本上不兼容的问题。dock......