ci中通过services指定私有仓库的docker:dind时报错

  image: harbor.dtdream.com/library/docker:20.10.21
  services:
    - name: docker:20.10.21-dind

services 指向 docker:20.10.21-dind 时可以正常在ci中执行docker命令

  image: harbor.dtdream.com/library/docker:20.10.21
  services:
    - name: harbor.dtdream.com/library/docker:20.10.21-dind

services 指向私有harbor中的docker:20.10.21-dind 时无法执行docker命令,报错如下

$ docker ps -a
error during connect: Get "https://docker:2376/v1.24/containers/json?all=1": dial tcp: lookup docker on 10.100.6.1:53: server misbehaving

请问如何处理

改成下面这样:

  image: harbor.dtdream.com/library/docker:20.10.21
  services:
    - name: harbor.dtdream.com/library/docker:20.10.21-dind
      alias: docker
1 个赞

感谢,这样可以了