一、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
如圖