# Using docker\_\* modules on Windows

**URL:** <https://forum.ansible.com/t/using-docker-modules-on-windows/25145>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 1, 2017, 8:18am UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145 "2017-08-01T08:18:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuriy\_Ostapenko](https://avatars.discourse-cdn.com/v4/letter/y/0ea827/32.png) [@Yuriy\_Ostapenko](https://forum.ansible.com/u/Yuriy_Ostapenko)\
**Post date:** [August 1, 2017, 8:18am UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145/1 "2017-08-01T08:18:09Z")

</div>

Hi everyone,

Are docker\_\* modules to be expected to work on Windows?

I try to pull image like this:

`

- name: Pull hello world image  
docker\_image:  
name: hello-world:nanoserver  
docker\_host: npipe://  
`

and get this error:

`

[WARNING]: FATAL ERROR DURING FILE TRANSFER: Traceback (most recent call last): File  
“/usr/local/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py”, line 270, in \_winrm\_exec  
self.\_winrm\_send\_input(self.protocol, self.shell\_id, command\_id, data, eof=is\_last) File  
“/usr/local/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py”, line 250, in  
\_winrm\_send\_input protocol.send\_message(xmltodict.unparse(rq)) File “/usr/local/lib/python2.7  
/dist-packages/winrm/protocol.py”, line 207, in send\_message return  
self.transport.send\_message(message) File “/usr/local/lib/python2.7/dist-  
packages/winrm/transport.py”, line 202, in send\_message raise WinRMTransportError(‘http’,  
error\_message) WinRMTransportError: (u’http’, u’Bad HTTP response returned from server. Code 500’)

`

Am I just doing something that simply isn’t supposed to work? Or is this rather a bug?

Regards

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [August 1, 2017, 8:32am UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145/2 "2017-08-01T08:32:43Z")

</div>

The docker modules won't run on a Windows host as they are written in Python and Windows runs Powershell modules. The error does seem to indicate something else is wrong but you won't be able to do this regardless. Are you on a particular version or are you just running from devel?

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Yuriy\_Ostapenko](https://avatars.discourse-cdn.com/v4/letter/y/0ea827/32.png) [@Yuriy\_Ostapenko](https://forum.ansible.com/u/Yuriy_Ostapenko)\
**Post date:** [August 1, 2017, 10:12am UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145/3 "2017-08-01T10:12:12Z")

</div>

Thanks, I’m running @devel.

I’m new to Ansible. I _did_ read that running control machine on Windows is a non-goal, but do you maybe know if running python modules (given python is present) is?

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [August 4, 2017, 6:49am UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145/4 "2017-08-04T06:49:32Z")

</div>

It isn’t a goal at this point in time. The decision was made to use Powershell for Windows modules as that gives us the ability to tap into the .NET framework where Python would be pretty limited in.

---

<div class="post-metadata">

**Author:** ![Yuriy\_Ostapenko](https://avatars.discourse-cdn.com/v4/letter/y/0ea827/32.png) [@Yuriy\_Ostapenko](https://forum.ansible.com/u/Yuriy_Ostapenko)\
**Post date:** [August 4, 2017, 5:21pm UTC](https://forum.ansible.com/t/using-docker-modules-on-windows/25145/5 "2017-08-04T17:21:54Z")

</div>

Thanks,

It sounds like the right pragmatic decision for modules managing the node itself.

It’s just that docker is a little bit special here. It seems pretty weird to have to implement identical win\_docker\_\* modules, since, essentially, you really need to use _the same_ docker engine API.  
I’m thinking if maybe there’s a way to manage docker on the node through remote socket with local\_action’s or something like that…
