我正在尝试为自动缩放的GitLab Runner install和use创建一个“分布式容器注册表镜像”,如GitLab所述。这是我的config.toml
的相关部分:
[[runners]]
name = "linux-c5.2xlarge"
limit = 40
url = "https://gitlab.com/"
token = "redacted"
executor = "docker+machine"
[runners.docker]
tls_verify = false
image = "redacted"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = true
shm_size = 0
[runners.cache]
Type = "s3"
Path = "redacted"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
AccessKey = "redacted"
SecretKey = "redacted"
BucketName = "redacted"
BucketLocation = "us-east-2"
[runners.machine]
IdleCount = 0
IdleTime = 300
MachineDriver = "amazonec2"
MachineName = "linux-c5.2xlarge-%s"
MachineOptions = [
"amazonec2-access-key=redacted",
"amazonec2-secret-key=redacted",
"amazonec2-ami=ami-0b316c366679a59d7",
"amazonec2-region=us-east-2",
"amazonec2-zone=c",
"amazonec2-use-private-address=true",
"amazonec2-security-group=gitlab-runners",
"amazonec2-instance-type=c5.2xlarge",
"amazonec2-request-spot-instance=true",
"amazonec2-spot-price=0.20",
"engine-registry-mirror=http://172.31.43.207:6000"
]
OffPeakTimezone = ""
OffPeakIdleCount = 0
OffPeakIdleTime = 0
我的跑步者和我的容器注册表镜像都在具有私有IP 172.31.43.207的同一台计算机上运行。
$ hostname --ip-address
172.31.43.207
$ sudo docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1975ab504374 registry:2 "/entrypoint.sh /etc…" 5 hours ago Up 5 hours 0.0.0.0:6000->5000/tcp registry
但是我的图像不断从Docker Hub中撤出。我可以看到每个新管道的下载数量都随着作业数量的增加而增加,并且注册表镜像显示为空:
$ curl http://172.31.43.207:6000/v2/_catalog
{"repositories":[]}
此功能对其他人有用吗?我究竟做错了什么?有什么办法可以调试吗?我可以检查任何相关的日志吗?预先感谢!