修复:移除 Docker 镜像加速步骤以避免 sudo 权限问题
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 3m59s
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 3m59s
- 移除需要 sudo 的 Docker daemon 配置步骤 - 核心优化(Alpine 镜像源、Go 代理)已在 Dockerfile 中 - 基础镜像会被 Docker 缓存,后续构建不会重复拉取
This commit is contained in:
@@ -18,25 +18,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 配置 Docker 镜像加速
|
|
||||||
run: |
|
|
||||||
# 配置 Docker Hub 镜像加速(阿里云、中科大、Docker 官方镜像)
|
|
||||||
sudo mkdir -p /etc/docker
|
|
||||||
sudo tee /etc/docker/daemon.json > /dev/null <<EOF
|
|
||||||
{
|
|
||||||
"registry-mirrors": [
|
|
||||||
"https://docker.1ms.run",
|
|
||||||
"https://docker.m.daocloud.io",
|
|
||||||
"https://docker.unsee.tech"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl restart docker
|
|
||||||
# 等待 Docker 重启完成
|
|
||||||
sleep 5
|
|
||||||
docker info | grep -A 10 "Registry Mirrors"
|
|
||||||
|
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
run: |
|
run: |
|
||||||
git clone https://git.boss160.cn/csxj2026/junhong_cmp_fiber.git .
|
git clone https://git.boss160.cn/csxj2026/junhong_cmp_fiber.git .
|
||||||
|
|||||||
Reference in New Issue
Block a user