🔧 `docker`的默认配置变更
This commit is contained in:
parent
1b7eed5d93
commit
c81aac970c
|
|
@ -3,6 +3,7 @@ services:
|
|||
build: .
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
network_mode: "host" # 使用宿主机网络
|
||||
privileged: true
|
||||
volumes:
|
||||
- ./runner-data:/data
|
||||
|
|
@ -17,10 +18,10 @@ services:
|
|||
|
||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||
# 注意:容器内访问宿主机需要使用 host.docker.internal 或宿主机IP
|
||||
- http_proxy=http://host.docker.internal:20122
|
||||
- https_proxy=http://host.docker.internal:20122
|
||||
- HTTP_PROXY=http://host.docker.internal:20122
|
||||
- HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - http_proxy=http://host.docker.internal:20122
|
||||
# - https_proxy=http://host.docker.internal:20122
|
||||
# - HTTP_PROXY=http://host.docker.internal:20122
|
||||
# - HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - no_proxy=localhost,127.0.0.1
|
||||
|
||||
# Linux 系统需要取消下面的注释以支持 host.docker.internal
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ RUNNER_NAME=${RUNNER_NAME:-docker-runner}
|
|||
|
||||
# 多个 label(逗号分隔,无空格)
|
||||
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:docker://ubuntu:22.04): " RUNNER_LABELS
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:host://ubuntu:22.04): " RUNNER_LABELS
|
||||
RUNNER_LABELS=${RUNNER_LABELS:-ubuntu-22.04:host://ubuntu:22.04}
|
||||
|
||||
# 创建 runner 目录
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ services:
|
|||
build: .
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
network_mode: "host" # 使用宿主机网络
|
||||
volumes:
|
||||
- ./runner-data:/data
|
||||
- ./setup.sh:/data/setup.sh:ro
|
||||
|
|
@ -16,15 +17,13 @@ services:
|
|||
|
||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||
# 注意:容器内访问宿主机需要使用 host.docker.internal 或宿主机IP
|
||||
- http_proxy=http://host.docker.internal:20122
|
||||
- https_proxy=http://host.docker.internal:20122
|
||||
- HTTP_PROXY=http://host.docker.internal:20122
|
||||
- HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - http_proxy=http://host.docker.internal:20122
|
||||
# - https_proxy=http://host.docker.internal:20122
|
||||
# - HTTP_PROXY=http://host.docker.internal:20122
|
||||
# - HTTPS_PROXY=http://host.docker.internal:20122
|
||||
# - no_proxy=localhost,127.0.0.1
|
||||
|
||||
# Linux 系统需要取消下面的注释以支持 host.docker.internal
|
||||
# extra_hosts:
|
||||
# - "host.docker.internal:host-gateway"
|
||||
|
||||
# 如果需要使用主机网络,取消下面的注释
|
||||
# network_mode: host
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ RUNNER_NAME=${RUNNER_NAME:-docker-runner}
|
|||
|
||||
# 多个 label(逗号分隔,无空格)
|
||||
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:docker://ubuntu:22.04): " RUNNER_LABELS
|
||||
read -p "Enter runner labels (default: ubuntu-22.04:host://ubuntu:22.04): " RUNNER_LABELS
|
||||
RUNNER_LABELS=${RUNNER_LABELS:-ubuntu-22.04:host://ubuntu:22.04}
|
||||
|
||||
# 创建 runner 目录
|
||||
|
|
|
|||
Loading…
Reference in New Issue