2.7. 使用 Red Hat Quay


以下步骤允许您使用 界面并创建新的组织和存储库,并搜索和浏览现有存储库。执行以下步骤 3,您可以使用 命令行界面与注册表交互,以及推送和拉取镜像。

  1. 使用您的浏览器访问位于 http://quay-server.example.com 的 Red Hat Quay registry 的用户界面,假设已在 /etc/hosts 文件中配置了 quay-server.example.com 作为您的主机名。
  2. 单击 Create Account,再添加一个用户,如 quayadmin密码为
  3. 在命令行中登录 registry:

    $ sudo podman login --tls-verify=false quay-server.example.com
    Username: quayadmin
    Password: password
    Login Succeeded!
    Copy to Clipboard Toggle word wrap

2.7.1. 推送和拉取镜像

  1. 要测试从 Red Hat Quay registry 中推送和拉取镜像,首先从外部注册表中提取示例镜像:

    $ sudo podman pull busybox
    Trying to pull docker.io/library/busybox...
    Getting image source signatures
    Copying blob 4c892f00285e done
    Copying config 22667f5368 done
    Writing manifest to image destination
    Storing signatures
    22667f53682a2920948d19c7133ab1c9c3f745805c14125859d20cede07f11f9
    Copy to Clipboard Toggle word wrap
  2. 使用 podman images 命令查看本地副本:

    $ sudo podman images
    REPOSITORY                          TAG      IMAGE ID       CREATED         SIZE
    docker.io/library/busybox           latest   22667f53682a   14 hours ago    1.45 MB
    ...
    Copy to Clipboard Toggle word wrap
  3. 标记此镜像,以准备将其推送到 Red Hat Quay registry:

    $ sudo podman tag docker.io/library/busybox quay-server.example.com/quayadmin/busybox:test
    Copy to Clipboard Toggle word wrap
  4. 接下来,将镜像推送到 Red Hat Quay registry。此步骤后,您可以使用浏览器查看存储库中标记的镜像。

    $ sudo podman push --tls-verify=false quay-server.example.com/quayadmin/busybox:test
    Getting image source signatures
    Copying blob 6b245f040973 done
    Copying config 22667f5368 done
    Writing manifest to image destination
    Storing signatures
    Copy to Clipboard Toggle word wrap
  5. 要从命令行测试对镜像的访问,首先删除镜像的本地副本:

    $ sudo podman rmi quay-server.example.com/quayadmin/busybox:test
    Untagged: quay-server.example.com/quayadmin/busybox:test
    Copy to Clipboard Toggle word wrap
  6. 再次从 Red Hat Quay registry 中拉取(pull)镜像:

    $ sudo podman pull --tls-verify=false quay-server.example.com/quayadmin/busybox:test
    Trying to pull quay-server.example.com/quayadmin/busybox:test...
    Getting image source signatures
    Copying blob 6ef22a7134ba [--------------------------------------] 0.0b / 0.0b
    Copying config 22667f5368 done
    Writing manifest to image destination
    Storing signatures
    22667f53682a2920948d19c7133ab1c9c3f745805c14125859d20cede07f11f9
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat