Dragonfly2
Dragonfly2 copied to clipboard
仓库注入为http加ip时生成的cert.d文件名字错误
类似这种
containerRuntime:
containerd:
enable: true
injectConfigPath: true
registries:
- 'https://ghcr.io'
- 'http://192.168.1.1'
其/etc/containerd/certs.d/生成的目录名字为http而不是192.168.1.1
应该是下面的命令未正确的提取http://之后的内容导致
domain=$(echo $registry | sed -e "s,http.://,," | sed "s,:.*,,")
测试
registry=http://192.168.1.1
echo $registry | sed -e "s,http.://,," | sed "s,:.*,,"
- 修改
echo $registry | awk -F '//' '{printf$2}'
# 或
echo $registry | sed -e "s,http.*://,," | sed "s,:.*,,"
Could you please submit a PR to fix this issue ?
您能提交 PR 来解决这个问题吗?
ok
@NatureLR Thx
Seems the same issue also needs to be fixed in v1? @gaius-qi @hyy0322 code