ci: job 瀹瑰櫒鎸傝浇 docker.sock锛屾敮鎸?docker build/compose 姝ラ
CI/CD Deploy (Admin) / 构建后端镜像并部署 (push) Failing after 0s
CI/CD Deploy (Admin) / 构建后端镜像并部署 (push) Failing after 0s
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
#
|
||||
# 环境(已确认):
|
||||
# - runner: local-runner (act_runner v0.6.1),labels: ubuntu-latest
|
||||
# - job 容器挂载 /var/run/docker.sock 与 /opt/freedom(由 runner-config.toml 的 volumes 提供)
|
||||
# - job 容器挂载 /var/run/docker.sock 与 /opt/freedom:由本 workflow 的 volumes 声明,
|
||||
# 并经 runner-config.yml 的 valid_volumes 白名单放行;host.docker.internal 解析由
|
||||
# workflow options + runner-config.yml 的 container.options(--add-host)共同提供
|
||||
# - Gitea 内网地址:host.docker.internal:3000(Gitea Actions 实例地址)
|
||||
# - 部署目录:/opt/freedom/deploy(含 docker-compose.yml 与 .env)
|
||||
#
|
||||
@@ -26,7 +28,9 @@ jobs:
|
||||
container:
|
||||
image: docker:24.0-cli
|
||||
# 挂载与 host 解析:workflow 级 volumes/options + runner-config valid_volumes 白名单
|
||||
# docker.sock 供 docker build / docker compose 使用;/opt/freedom 供 workspace 与部署目录使用
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /opt/freedom:/opt/freedom
|
||||
options: --add-host=host.docker.internal:host-gateway
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user