Repository navigation
Docker:新增毫秒镜像源 (docker.1ms.run),并修复未安装 jq 时的 sed 换源问题 - #431
Open
LinRanAstra wants to merge 3 commits into
Open
LinRanAstra wants to merge 3 commits into
LinRanAstra wants to merge 3 commits into
Conversation
- 新增专用镜像站 `OneMs`,code 为 `1ms` - 贡献者 `@MingriLingran` 更名为 `@LinRanAstra` <[email protected]>,并加入 Docker 的 sauciers
- sed 命令的分隔符由 `/` 改为 `|`,避免换源 URL 中的 `/` 截断 `s` 命令, 导致 sed 报 `unknown option to 's'` - 同步更新 rawstr4c.md 模板与生成的 rawstr4c.h
sed 在匹配不到任何内容时同样以退出码 0 结束,因此配置文件中没有 `"registry-mirrors":` 键时会静默报告换源成功,实际文件未被修改。 - 先读取配置文件确认该字面量存在,否则报错并给出需手动添加的内容 - sed 替换成功后补充成功提示
|
Hi @LinRanAstra ❤️ 感谢你的贡献!我们将在最少半小时,最多5天内阅读此 PR 并回复你 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改描述
docker.1ms.run)这一目前仍在正常服务的镜像站jq的机器上,Docker 换源走的是sed兜底路径,该路径有两个 bug:sed命令用/作为分隔符,而替换内容就是换源 URL 本身(如https://docker.1ms.run),URL 中的/会把s命令提前截断,直接报错unknown option to 's'sed在一行都匹配不到时同样返回退出码 0,因此当daemon.json中没有registry-mirrors键时,chsrc 会静默报告「换源完成」,实际文件未被修改