使用 Docker 执行器部署 GitLab Runner(详细信息)。
我运行一个简单的管道:
image: alpine
test:
script:
- echo 'Hello world'
它失败了,日志是:
Running with gitlab-ci-multi-runner 9.2.0 (adfc387)
on myhost.domain.tdl (44a313eb)
Using Docker executor with image alpine ...
ERROR: Preparation failed: Error reading remote info: json: cannot unmarshal number into Go value of type bool
Will be retried in 3s ...
Using Docker executor with image alpine ...
ERROR: Preparation failed: Error reading remote info: json: cannot unmarshal number into Go value of type bool
Will be retried in 3s ...
Using Docker executor with image alpine ...
ERROR: Preparation failed: Error reading remote info: json: cannot unmarshal number into Go value of type bool
Will be retried in 3s ...
ERROR: Job failed (system failure): Error reading remote info: json: cannot unmarshal number into Go value of type bool
怎么了?看起来像是 Go 内部某处的异常。甚至不清楚如何调试。
配置:
$ cat /etc/gitlab-runner/config.toml
# This file is managed remotely, all changes will be lost
concurrent = 1
[[runners]]
name = "myhost.domain.tdl"
url = "http://gitlab.domain.tld/ci"
token = "mytokenhere"
executor = "docker"
[runners.docker]
image = "debian"
privileged = false
disable_cache = false
cap_drop = [ "NET_ADMIN", "SYS_ADMIN", "DAC_OVERRIDE" ]
码头工人:
$ docker --version
Docker version 1.6.2, build 7c8fca2
$ docker info
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
CPUs: 1
Total Memory: 997.1 MiB
Name: db80x64-vm
ID: FZ72:HSJJ:CE4G:WCTI:O2JC:7VQM:T5IL:KXHJ:4TK2:U2S7:G4QV:5C4X
WARNING: No memory limit support
WARNING: No swap limit support
Docker 版本很旧,需要更新。
以下是对这个问题的讨论:https ://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2271