自建Linux Shell版Bitbucket Runner无法调用Docker守护进程求助
自建Bitbucket Linux Shell Runner中Docker命令执行失败问题
在自建的linux.shell类型Bitbucket Runner节点上,Docker服务已处于运行状态,但bitbucket-pipelines.yml中的Docker命令无法正常执行。通过SSH登录同一实例运行相同命令却能正常工作。
配置文件
bitbucket-pipelines.yml内容如下:
pipelines: default: - step: name: Deploy to production runs-on: - 'linux.shell' - 'self.hosted' # trigger: manual # Uncomment to make this a manual deployment. script: - echo "Deploying to production environment" - sudo lsof -i -P -n - systemctl --type=service --state=running - docker ps -a - chmod +x start-server.sh - ./start-server.sh
环境信息
echo $PATH输出:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
which docker输出:/usr/bin/docker
报错信息
执行docker ps -a时出现以下错误:
+ docker ps -a Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
内容的提问来源于stack exchange,提问作者Evryvilanislemn
相关产品推荐
相关产品推荐

