gitlab-runner 不使用本地图像

gitlab-runner 不使用本地图像

如何强制gitlab-runner exec docker使用本地图像?

Using Docker executor with image docker_compose:0.0.1 ...
Using docker image sha256:be4b46f2adbc8534c7f6738279ebedd6106969695f5e596079e89e815d375d9c for predefined container...
Pulling docker image docker_compose:0.0.1 ...
ERROR: Job failed: Error response from daemon: pull access denied for docker_compose, repository does not exist or may require 'docker login'
FATAL: Error response from daemon: pull access denied for docker_compose, repository does not exist or may require 'docker login' 

答案1

您可以使用--docker-pull-policy never

gitlab-runner exec docker --docker-pull-policy never

它不会尝试下载任何图像,仅依赖于本地缓存,其中包括您自己提取或构建的图像。

相关内容