We have ~55 pipelines with ~200 steps that build using plugin/docker - it’s untenable to simply modify all of those pipelines in a reasonable fashion, and we have no interest or time to build, deploy, and maintain a registry mirror.
Since we can’t modify pipelines or setup a mirror, we are trying to use DRONE_RUNNER_VOLUMES to have drone agents mount the host docker credentials into the pipelines step so that the daemon is already authenticated with dockerhub by the time it starts up. However we are hitting a problem where the variable is somehow defined twice in the agent’s configuration:
We are using a drone autoscaler to launch drone-docker-runner instances in AWS EC2, and providing some additional configuration by defining an agent configuration file using DRONE_AGENT_ENV_FILE.
The env file looks like this:
DRONE_SECRET_SECRET=<secret>
DRONE_SECRET_ENDPOINT=<snip>
DRONE_DOCKER_CONFIG=/root/.docker/config.json
DRONE_RUNNER_VOLUMES=/root/.docker:/root/.docker
All these environment variables are set as expected, but somehow DRONE_RUNNER_VOLUME ends up defined twice in the agent container that starts. The follow is the relevant portion of “docker inspect agent” for one of the auto-scaled agents. Since the empty version of DRONE_RUNNER_VOLUMES is defined second, the value we set is ignored, and the mount does not happen as expected.
"Env": [
"DRONE_SECRET_ENDPOINT=<snip>",
"DRONE_DOCKER_CONFIG=/root/.docker/config.json",
"DRONE_RUNNER_VOLUMES=/root/.docker:/root/.docker",
"DRONE_SECRET_SECRET=<snip>",
"DRONE_RPC_HOST=<snip>",
"DRONE_RPC_PROTO=https",
"DRONE_RPC_SERVER=<snip>",
"DRONE_RPC_SECRET=<snip>",
"DRONE_RUNNER_CAPACITY=2",
"DRONE_RUNNER_NAME=agent-unx6C5uD",
"DRONE_RUNNER_VOLUMES=",
"DRONE_RUNNER_DEVICES=",
"DRONE_RUNNER_PRIVILEGED_IMAGES=",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"GODEBUG=netdns=go",
"DRONE_PLATFORM_OS=linux",
"DRONE_PLATFORM_ARCH=amd64"
],
To be clear, we are a paying customer with a drone enterprise license, and so far the response to this issue has been lackluster. We need a solution, not a work around.