尝试使用我们的项目设置CircleCI。我们使用docker-compose up --build
来正常运行它。
这是我们的config.yml:
version: 2
jobs:
build:
working_directory: ~/tmp
docker:
- image: circleci/node:9.4.0
branches:
only:
- circleci
steps:
- checkout
- setup_remote_docker
- run:
name: Install Docker client
command: |
set -x
VER="v17.12.0-ce"
sudo curl -L -o /usr/bin/docker-$VER.tgz https://github.com/docker/docker-ce/archive/$VER.tar.gz
sudo tar x -C /tmp -f /usr/bin/docker-$VER.tgz
sudo chmod +x /usr/bin/docker*
sudo rm /usr/bin/docker-$VER*.tgz
- run:
name: Install Docker Compose
command: |
VER="1.18.0"
sudo curl -L "https://github.com/docker/compose/releases/download/$VER/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
- run:
name: Start container and verify it's working
command: |
set -x
sudo docker-compose up --build
这个错误我们不断得到输出:
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
我们缺少什么?
答案 0 :(得分:5)
这里的问题是你的配置做得太多了。使用CircleCI Docker Convenience图像的优点是预装了Docker等工具。我将配置修改为适用的配置:
version: 2
jobs:
build:
docker:
- image: circleci/node:9.4.0
branches:
only:
- circleci
steps:
- checkout
- setup_remote_docker
- run:
name: Start container and verify it's working
command: docker-compose up --build

此致,
里卡多N费利西亚诺郎 开发者传播者,CircleCI