- Gitlab Runner CI/CD 错误:
Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
ERROR: Job failed: exit status 1
解决办法:
# 修改权限
$chmod +x /usr/local/bin/gitlab-runner
# 添加gitlab-runner用户
$useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
# 将gitlab-runner用户添加到docker组
$sudo usermod -aG docker gitlab-runner
# 验证
$sudo -u gitlab-runner -H docker info
如图