当前位置: 代码迷 >> 综合 >> Gitlab runner docker Could not resolve host
  详细解决方案

Gitlab runner docker Could not resolve host

热度:79   发布时间:2024-01-21 08:46:08.0
环境:
gitlab-runner  version: 13.3.1
docker version: 19.03.2
centOS7
【报错】Gitlab runner docker Could not resolve host
【问题】docker 容器内无法获取gitlab 仓库代码
本地虚拟机gitlab runner运行没有问题,布署到线上服务器出现这个报错,各种尝试后并不能结决问题
【解决方案】 参考 :https://stackoverflow.com/questions/50325932/gitlab-runner-docker-could-not-resolve-host
设置 network_mode 为 host 也有说设为 gitlab_default 但不适用当前情况vi  /etc/gitlab-runner/config.toml[runners.docker]network_mode = "host"
重启gitlab runner   gitlab-runner restart
  相关解决方案