Plugins/docker: Parameter add_host seems not work

It seems add_host field not work. I got log message error Error logging in to v2 endpoint, trying next endpoint: Get https://harbor.edu.com/v2/: dial tcp: lookup harbor.edu.com on 127.0.0.11:53: no such host. Below is my partial .drone.yaml file:

...
- name: image
    image: plugins/docker
    settings:
      add_host:
        - harbor.edu.com:172.16.11.198
      repo: harbor.edu.com/library/fastdfs-test
      username: admin
      password: Harbor12345
      insecure: true
      registry: harbor.edu.com
      dockerfile: ./Dockerfile
      debug: true
      tags:
        - latest
        - master
...

This plugin exposes the --add-host option for the docker build command. The error message you posted indicates the docker login command is failing; please note that docker login does not have an --add-host option (see below) therefore one should not expect --add-host to have any impact on login.

$ docker login --help

Usage:	docker login [OPTIONS] [SERVER]

Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.

Options:
  -p, --password string   Password
      --password-stdin    Take the password from stdin
  -u, --username string   Username