ci(workflows): 配置 Docker 支持不安全的注册表
Some checks failed
Build and Push Docker / build (push) Failing after 3m9s
Some checks failed
Build and Push Docker / build (push) Failing after 3m9s
- 在 Docker workflow 中添加配置,允许访问指定的不安全注册表 - 创建并写入 /etc/docker/daemon.json 文件,设置 insecure-registries 项 - 发送信号重启 Docker 守护进程使配置生效 - 增加延时等待 Docker 重启完成
This commit is contained in:
parent
ac0776cc9c
commit
0c79e9d947
@ -12,6 +12,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Configure Docker for insecure registry
|
||||
run: |
|
||||
mkdir -p /etc/docker
|
||||
cat > /etc/docker/daemon.json << 'EOF'
|
||||
{
|
||||
"insecure-registries": ["192.168.100.120:8418"]
|
||||
}
|
||||
EOF
|
||||
pkill -HUP dockerd || true
|
||||
sleep 3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user