在gitlab集成gitlab-runner执行job时候,发现获取本地私服registry发生错误,日志如下:
Running with gitlab-runner 15.8.0 (12335144)
on runner run in the docker container,depend some images need difine in the config or gitlab-ci file 3ea798cc, system ID: r_ObcQtykLpVY0
Preparing the "docker" executor
Using Docker executor with image centos:7-maven-lrn1.3 ...
Pulling docker image centos:7-maven-lrn1.3 ...
WARNING: Failed to pull image with policy "if-not-present": manifest for docker.io/centos:7-maven-lrn1.3 not found (manager.go:237:18s)
ERROR: Job failed: failed to pull image "centos:7-maven-lrn1.3" with specified policies [if-not-present]: manifest for docker.io/centos:7-maven-lrn1.3 not found (manager.go:237:18s)

一、gitlab-runner安装过程省略
二、gitlab-runner registry 过程省略
三、docker私有仓库安装省略
三、私服仓库配置相关

在GitLab中使用gitlab-runner执行job时遇到从私有Docker仓库拉取镜像失败的错误。解决方案包括设置环境变量DOCKER_AUTH_CONFIG,通过dockerlogin生成凭证,将Base64编码后的用户名密码放入配置文件中,无论是项目级还是系统级。配置完成后,runner应能成功访问私有仓库并拉取所需镜像。
最低0.47元/天 解锁文章
465

被折叠的 条评论
为什么被折叠?



