# What's the point of docker connection?

**URL:** <https://forum.ansible.com/t/whats-the-point-of-docker-connection/22680>\
**Category:** Ansible Project\
**Created:** [September 29, 2016, 9:09pm UTC](https://forum.ansible.com/t/whats-the-point-of-docker-connection/22680 "2016-09-29T21:09:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joaquin\_Menchaca](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Joaquin\_Menchaca](https://forum.ansible.com/u/Joaquin_Menchaca)\
**Post date:** [September 29, 2016, 9:09pm UTC](https://forum.ansible.com/t/whats-the-point-of-docker-connection/22680/1 "2016-09-29T21:09:28Z")

</div>

I was wondering, as docker seems to be more popular to administer servers, not local development systems, what is the point of docker connection? It’s utility seems rather limited.

The docker connection only works on localhost, not on with the docker deamon running on the remote target system you are configuring.

Thus it is useful to configure the current system you are on, but not so much for a remote system. You could remotely run an ansible script that works with containers on that system, or do some fancy ssh tunnel, but it is easier to just use command or shell and run `docker exec`.

Thoughts?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 29, 2016, 9:25pm UTC](https://forum.ansible.com/t/whats-the-point-of-docker-connection/22680/2 "2016-09-29T21:25:27Z")

</div>

The docker connection implements docker exec and docker cp. it does work with remote docker servers but does require that the daemon be exposed.

See [http://docs.ansible.com/ansible/intro\_inventory.html#non-ssh-connection-types](http://docs.ansible.com/ansible/intro_inventory.html#non-ssh-connection-types)

---

<div class="post-metadata">

**Author:** ![Joaquin\_Menchaca](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@Joaquin\_Menchaca](https://forum.ansible.com/u/Joaquin_Menchaca)\
**Post date:** [September 29, 2016, 10:15pm UTC](https://forum.ansible.com/t/whats-the-point-of-docker-connection/22680/3 "2016-09-29T22:15:53Z")

</div>

I went by the line: This connector deploys the playbook directly into Docker containers using the **local** Docker client. I would have liked to use the client from the remote system within the ssh session.  
Does exposing a deamon with root access external systems sound like a reasonable solution? That feels scary.
