This is my .drone.yml
kind: pipeline
type: docker
name: default
steps:
- name: docker
image: plugins/docker
settings:
add_host: gitea.xxx.com:192.168.137.240
registry: harbor.xxx.com
username: admin
password: xxxxxx
repo: harbor.xxx.com/library/xxx
insecure: true
debug: true
tags:
- latest
I install drone docker runner like this:
docker run --detach \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_PROTO=http \
--env=DRONE_RPC_HOST=drone.xxx.com \
--env=DRONE_RPC_SECRET=xxxxxxxxxxxx\
--env=DRONE_RUNNER_CAPACITY=2 \
--env=DRONE_RUNNER_NAME=drone-docker-runner-1 \
--add-host=gitea.xxx.com:192.168.137.240 \
--add-host=harbor.xxx.com:192.168.137.241 \
--add-host=drone.xxx.com:192.168.137.7 \
--publish=3240:3000 \
--restart=always \
--name=drone-docker-runner-1 \
drone/drone-runner-docker:1
When i start a build, i get the following error.
fatal: unable to access ‘http://gitea.xxx.com/xxx/xxx.git/’: Could not resolve host: gitea.xxx.com 32s
Can i add host to cloning step?