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 dial tcp: lookup on no such host. Below is my partial .drone.yaml file:

- name: image
    image: plugins/docker
      username: admin
      password: Harbor12345
      insecure: true
      dockerfile: ./Dockerfile
      debug: true
        - 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.

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