NodeJS 如何从windows gitlab runner访问远程Docker

x8diyxa7  于 2023-01-12  发布在  Node.js
关注(0)|答案(1)|浏览(141)

我是gitlab ci/cd的初学者。我想使用windows gitlab runner在远程docker上建立映像。我如何从windows gitlab runner连接远程docker。谢谢

x759pob2

x759pob21#

this works for me. add environment environment = ["DOCKER_HOST=tcp://example:2375"] and [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_cache = false
    volumes = ["/cache"]

concurrent = 1
check_interval = 0
shutdown_timeout = 0

[session_server]
session_timeout = 1800

runners
name = "windows gitlab runner"
url = "http://192.168.1.56:909/"
id = 5
token = "token"
token_obtained_at = 2023-01-06T08:09:13Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "shell"
shell = "powershell"
environment = ["DOCKER_HOST=tcp://example:2375"]
[runners.custom_build_dir]
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = false
disable_cache = false
volumes = ["/cache"]

相关问题