Docker run --network="host" as plugin

Hi :smile:,

I’ve written a k8s plugin prototype and a test in a minikube environment on my laptop worked fine.

e.g. docker run -e PLUGIN_VERSION=“1.0.5” --rm --network=“host” stefanhans/update-via-docker:1.0.1

Now I’m trying it with .drone.yml

image: stefanhans/update-via-docker:1.0.1
version: 1.0.5
network_mode: host

But, “Error: Insufficient privileges to use network_mode”

Any ideas?

Cheers, Stefan

your repo should be flagged as trusted (GUI) and add privileged : true in the step

@jhernandez thanks for the reply. You are correct that the user must enable the trusted flag in the user interface. However, in this case, I do not think privileged: true is required, since he wants to use host machine networking, not start the containing in privileged mode. :slight_smile:


enabling Project Settings -> Trusted does the job :+1:.

Thanks :smiley: