我试图在Windows( v1.1.2 )中使用 Drone CI在本地实施CI管道构建,同时尝试从Dockerfile中构建Docker映像。本地。我遇到了这个错误。
drone exec --trusted .\.drone_local.yml [docker_local_build:0] + docker build -t foo/bar .
[docker_local_build:1] time="2019-08-05T11:10:51Z" level=error msg="failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial tcp 127.0.0.1:2375: connect: connection refused"
[docker_local_build:2] error during connect: Post http://localhost:2375/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=zraud3rwkc2ipwuu6gw6wt5uf&shmsize=0&t=foo%2Fbar&target=&ulimits=null&version=1: context canceled
2019/08/05 16:40:55 docker_local_build : exit code 1
这是我使用的drone.yml。
kind: pipeline
name: default
clone:
disable: true
steps:
- name: docker_local_build
image: docker
privileged: true
environment:
DOCKER_HOST: tcp://localhost:2375
commands:
- docker build -t foo/bar .
和Dockerfile
FROM openjdk:8-jdk-alpine
ADD foo/target/bar.jar bar.jar
EXPOSE 8082
ENTRYPOINT ["java","-jar","bar.jar"]
我已在运行Windows 10的系统中安装了docker( v19.03.1 )。
请帮助我解决这个问题。