Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加podman 换源支持 #137

Open
happy-game opened this issue Dec 8, 2024 · 1 comment
Open

添加podman 换源支持 #137

happy-game opened this issue Dec 8, 2024 · 1 comment
Labels
wr_target ware target

Comments

@happy-game
Copy link
Collaborator

描述新的换源目标

podman 是一个与docker类似的容器运行时工具, 它的优势在于更加的轻量化, 且无需root权限就可使用.

请尽可能提供可参考的换源方法

暂无专门用于podman的镜像站提高换源方法.
但可参考以下几篇博客:

请尽可能提供已有镜像站

podman可以直接使用docker镜像站.

@ccmywish ccmywish added the wr_target ware target label Dec 8, 2024
@happy-game
Copy link
Collaborator Author

podman 使用两个文件决定一个镜像要从什么地方拉取, 分别是:

  • $HOME/.config/containers/registries.conf(优先级更高)
  • /etc/containers/registries.conf

registries.conf是一个 toml文件, 其内容可以在 containers/image 项目的文档中查看.

该文件的配置较为复杂, 有一个配置 unqualified-search-registries , 它是一个数组,可以为未指定仓库的镜像设置一个默认的源.

除此之外还可以为dockerhub, ghcr.io, gcr.io等不同registries定义不同的镜像源, 也可为指定的镜像源设置认证信息.

chsrc关注的应该是更为通用的解决方法, 因此我们只需要设置unqualified-search-registriesdockerhub镜像源 或者用户自行指定的镜像源. 但仍应该输出一些提示告知用户可自行更换ghcr.io等非dockerhub源.

registries.conf进行修改的实现思路与 docker换源类似, 但应想办法对换源行为进行区分, 从而确定选择写入哪个文件.

@ccmywish ccmywish changed the title [New Target] 添加podman 换源支持 添加podman 换源支持 Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wr_target ware target
Projects
None yet
Development

No branches or pull requests

2 participants