我是gitlab ci/cd的初学者。我想使用windows gitlab runner在远程docker上建立映像。我如何从windows gitlab runner连接远程docker。谢谢
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 = 1check_interval = 0shutdown_timeout = 0
[session_server]session_timeout = 1800
runnersname = "windows gitlab runner"url = "http://192.168.1.56:909/"id = 5token = "token"token_obtained_at = 2023-01-06T08:09:13Ztoken_expires_at = 0001-01-01T00:00:00Zexecutor = "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 = falseimage = "alpine:latest"privileged = falsedisable_cache = falsevolumes = ["/cache"]
1条答案
按热度按时间x759pob21#
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"]