Container Registry 使用手册

Container Registry (龙芯容器镜像仓库) 是适用于龙芯平台的容器镜像下载服务提供站点。网站地址 https://cr.loongnix.cn
采用 quay 实现,提供免密查询和下载功能。本文介绍如何在 linux 下配置并使用龙芯镜像仓库和如何在网页中查找已经支持的龙芯镜像下载地址。

1. 命令行使用

1.docker 用户在 /etc/docker/daemon.json 文件中,增加以下内容

root@loongson:~# cat /etc/docker/daemon.json 
{
    "registry-mirror": ["https://cr.loongnix.cn"]
}

2.重启 docker 服务

systemctl daemon-reload
systemctl restart docker

3.测试

root@mloongson:~# docker run cr.loongnix.cn/hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 $ https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started

2. 网页端使用

龙芯容器镜像仓库采用 quay 开源项目。该项目已移植到 LoongArch64 架构,当前在 LoongArch64 架构上稳定运行。以龙芯浏览器为例

  1. 访问 https://cr.loongnix.cn cr.loongnix.cn

  2. 为了方便使用,quay服务将自动重定向到 https://cr.loongnix.cn/search cr.loongnix.cn.search

  3. 页面可以分页浏览所有镜像,但更常用的是在搜索框中输入想查询镜像的关键字 cr.loongnix.cn.search.alpine

  4. 点击查询到的镜像后,页面跳转到该镜像的详细信息,如果想查看该镜像的 tag,点击左侧 tag 标签,如果想快速生成该 tag 的下载链接,点击右侧 下载 按钮 cr.looongnix.cn.alpine.tags

  5. 进入弹窗后,按照图示操作,即可快速拷贝该镜像的下载地址到剪切板,然后在命令行中粘贴即可下载。 cr.loongnix.cn.alpine.fetch

©龙芯开源社区 all right reserved,powered by Gitbook文档更新时间: 2024-11-08 10:27:22

results matching ""

    No results matching ""

    results matching ""

      No results matching ""