# Docker support for docker-py 1.6

**URL:** <https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555>\
**Category:** Ansible Developer\
**Created:** [February 12, 2014, 11:47pm UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555 "2014-02-12T23:47:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Magnus\_Andersson](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Magnus\_Andersson](https://forum.ansible.com/u/Magnus_Andersson)\
**Post date:** [February 12, 2014, 11:47pm UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555/1 "2014-02-12T23:47:21Z")

</div>

Hi

What is the status for updating the support for newer Docker versions for the ansible-docker module?

The currently shipped version seems to be outdated and won’t run with the latest docker-py library.

I did a few quick modifications locally just to get it running again, but the new docker API contained a whole lot more than before. So I’d like to know if there is any ongoing effort in this area?

Especially the [port redirection](https://docs.docker.io/en/latest/use/port_redirection/)needs some love to reflect the capabilities the original docker API, this is also [reflected in docker-py](https://github.com/dotcloud/docker-py#port-bindings). On top of that there is functionality not supported today like working directories, linking, cpu throttling etc.

/Magnus

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 13, 2014, 12:46am UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555/2 "2014-02-13T00:46:21Z")

</div>

I’ve already merged in a pull request today, check it out!

There’s updates to the docker module and also a docker\_image module.

---

<div class="post-metadata">

**Author:** ![Magnus\_Andersson](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Magnus\_Andersson](https://forum.ansible.com/u/Magnus_Andersson)\
**Post date:** [February 13, 2014, 9:35am UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555/3 "2014-02-13T09:35:52Z")

</div>

Hi

Cool, that looks like what I was hoping for.

/Magnus

> **(attachments)**
>
> ![ma.png](https://us1.discourse-cdn.com/ansible/original/2X/e/e545f57dc7f24bbfff49b9cc2af7828fbec69aba.png)

---

<div class="post-metadata">

**Author:** ![Magnus\_Andersson](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Magnus\_Andersson](https://forum.ansible.com/u/Magnus_Andersson)\
**Post date:** [February 17, 2014, 9:14pm UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555/4 "2014-02-17T21:14:15Z")

</div>

Hi

Looking at the latest source for docker ‘priviledged’ is still included on line 390:  
[https://github.com/ansible/ansible/blob/devel/library/cloud/docker#L390](https://github.com/ansible/ansible/blob/devel/library/cloud/docker#L390)

This gives me an error with the latest docker.py from git. It has moved from create\_container to start. See:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 17, 2014, 10:54pm UTC](https://forum.ansible.com/t/docker-support-for-docker-py-1-6/14555/5 "2014-02-17T22:54:21Z")

</div>

Let’s have it work with latest.

Send me some pull requests along and we’ll get them merged in.
