Plugin/docker fails on update ca-certificates

When publish image using plugin/docker, the image build fails onRUN apk add --update ca-certificates tzdata` with below error.

The docker build works fine outside the drone plugin/docker.

Any clue on why this is occuring?

[publish:L95:15s] fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
[publish:L96:15s] ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: temporary error (try again later)
[publish:L97:15s] WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
[publish:L98:20s] ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/community: temporary error (try again later)
[publish:L99:20s] WARNING: Ignoring APKINDEX.5022a8a2.tar.gz: No such file or directory ```

If your docker build cannot reach an external address or perform a dns lookup it usually points to host machine network configuration issues. Drone creates user-defined networks for your pipeline, which have different network properties than the default bridge. You need to make sure you host machine is configured accordingly.

@bradrydzewski thanks for replying. The issue was dns, the plugin/docker image resolve.conf has the default dns 8.8.8.8 which doesn’t work on our network or AWS. I mapped the host resolve.conf to plugin/docker by mounting volume and apk add started working.