Docker-ssh非root路径/ getsockopt:连接被拒绝

问题描述 投票:1回答:1

我正在尝试使用docker-ssh的gitlab-runner。以下是我的config.toml的样子:

[[runners]]
name = “CI/CD docker-ssh alfa”
url = “https://gitlab.com/”
token = “<SOME_TOKEN>“
executor = “docker-ssh”
[runners.ssh]
user = “myuser”
password = “my password”
[runners.docker]
tls_verify = false
image = “ubuntu:latest”
privileged = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]

但我得到了这个错误:

Running with gitlab-runner 11.3.0 (d78e9e67)
on CI/CD docker-ssh alfa 1f147b76
Using Docker executor with image ubuntu:latest …
ERROR: Preparation failed: build directory needs to be absolute and non-root path
Will be retried in 3s …
Using Docker executor with image ubuntu:latest …
ERROR: Preparation failed: build directory needs to be absolute and non-root path

所以我尝试更改构建目录,这里我的config.toml文件看起来像现在:

[[runners]]
name = “CI/CD docker-ssh alfa”
url = “https://gitlab.com/”
token = “<SOME_TOKEN>“
executor = “docker-ssh”
builds_dir = “/home/myuser/“
[runners.ssh]
user = “myuser”
password = “my password”
[runners.docker]
tls_verify = false
image = “ubuntu:latest”
privileged = false
disable_cache = false
volumes = [”/cache"]
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]

但我得到了这个新错误:

Running with gitlab-runner 11.3.0 (d78e9e67)
on CI/CD docker-ssh alfa 1f147b76
Using Docker executor with image ubuntu:latest …
WARNING: Since GitLab Runner 10.0 docker-ssh and docker-ssh+machine executors are marked as DEPRECATED and will be removed in one of the upcoming releases
Pulling docker image ubuntu:latest …
Using docker image sha256:cd6d8154f1e16e38493c3c2798977c5e142be5e5d41403ca89883840c6d51762 for ubuntu:latest …
ERROR: Preparation failed: dial tcp 172.17.0.2:22: getsockopt: connection refused
Will be retried in 3s …

知道我做错了什么吗?

docker ssh docker-compose gitlab gitlab-ci-runner
1个回答
0
投票

坚持使用HTTPS URL,并尝试修复错误:

build directory needs to be absolute and non-root path

this thread

我在旧的gitlab-ci-multi-runner 9.5.1上运行我的CI。

我更新到gitlab-runner 10.8.0,现在没关系。

或者this thread

build_dir="C:\\gitlab-runner\\builds"设置config.toml

© www.soinside.com 2019 - 2024. All rights reserved.