# DRONE\_DOCKER\_CONFIG with Autoscaler and custom cloud-init

**URL:** <https://drone.discourse.group/t/drone-docker-config-with-autoscaler-and-custom-cloud-init/10209>\
**Category:** Drone Support\
**Created:** [September 18, 2019, 7:29pm UTC](https://drone.discourse.group/t/drone-docker-config-with-autoscaler-and-custom-cloud-init/10209 "2019-09-18T19:29:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobmanary](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bobmanary/32/5923_2.png) [@bobmanary](https://drone.discourse.group/u/bobmanary)\
**Post date:** [September 18, 2019, 7:29pm UTC](https://drone.discourse.group/t/drone-docker-config-with-autoscaler-and-custom-cloud-init/10209/1 "2019-09-18T19:29:23Z")

</div>

I’m attempting to combine [https://autoscale.drone.io/configure/cloud-init/](https://autoscale.drone.io/configure/cloud-init/) with “option 2” from [How to pull private images with 1.0](http://discuss.harness.io/t/how-to-pull-private-images-with-1-0/3155). I have cloud-init and the autoscaler working to inject a .docker/config.json file into agent containers, but it doesn’t look like the autoscaler currently has a method of setting the necessary DRONE\_DOCKER\_CONFIG env var on the agents it starts.

Am I overlooking something?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [September 18, 2019, 7:58pm UTC](https://drone.discourse.group/t/drone-docker-config-with-autoscaler-and-custom-cloud-init/10209/2 "2019-09-18T19:58:44Z")

</div>

you can pass additional environment variables to the agent using one of the following autoscaler configuration variables:

[https://autoscale.drone.io/reference/drone-agent-environ/](https://autoscale.drone.io/reference/drone-agent-environ/)  
[https://autoscale.drone.io/reference/drone-agent-env-file/](https://autoscale.drone.io/reference/drone-agent-env-file/)

for example:

```auto
DRONE_AGENT_ENVIRON=DRONE_DOCKER_CONFIG=/path/to/.docker/config.json

```

also remember the docker config file exists on the host machine, and is not available to the autoscaler unless [mounted as a volume](https://autoscale.drone.io/reference/drone-agent-volumes).
