# ansible osx docker problems

**URL:** <https://forum.ansible.com/t/ansible-osx-docker-problems/18359>\
**Category:** Ansible Project\
**Created:** [May 31, 2015, 1:52pm UTC](https://forum.ansible.com/t/ansible-osx-docker-problems/18359 "2015-05-31T13:52:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronny\_Abraham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Ronny\_Abraham](https://forum.ansible.com/u/Ronny_Abraham)\
**Post date:** [May 31, 2015, 1:52pm UTC](https://forum.ansible.com/t/ansible-osx-docker-problems/18359/1 "2015-05-31T13:52:37Z")

</div>

am just trying to tell Ansible to build a docker image on my OS X machine and this is the error I get:

```auto
$ ansible-playbook main.yml

PLAY [localhost] **************************************************************

GATHERING FACTS ***************************************************************
ok: [localhost]

TASK: [Build docker image from dockerfiles] ***********************************
failed: [localhost] => {"changed": false, "failed": true}
msg: ConnectionError(ProtocolError('Connection aborted.', error(2, 'No such file or directory')),)

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/ronny/main.retry

localhost : ok=1 changed=0 unreachable=0 failed=1

```

This is the main.yml file I am using:

```auto
---
- hosts: localhost
  connection: local

  tasks:
        - name: Build docker image from dockerfiles
          docker_image:
            name: testimage
            path: "/Users/ronny/projects/dockers/tutorial/ansibledocker/test"
            state: build

```

My Dockerfile:

```auto
# Build an example Docker container image. 
FROM busybox 
MAINTAINER Jeff Geerling

# Run a command when the container starts. 
CMD ["/bin/true”]”

```

My docker file is located in **ansibledocker/test/Dockerfile**

And the main.yml file is located in **ansibledocker** \*\*/main.yml\*\*

I’m running this on OS X.

I am totally lost at this point and any help would be very appreciated.
