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

时间:2018-09-24 04:06:30

标签: docker ssh docker-compose gitlab gitlab-ci-runner

我正在尝试将gitlab-runner与docker-ssh结合使用。这是我的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 …

知道我在做什么错吗?

1 个答案:

答案 0 :(得分:0)

使用HTTPS URL粘贴,然后尝试改正错误:

<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>

console.log( gettext('Customer') );

请参见this thread

  

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

     

我更新到gitlab-runner 10.8.0,现在可以了。

this thread

  

build directory needs to be absolute and non-root path 中设置build_dir="C:\\gitlab-runner\\builds"