# Unable to reference to local docker image

**URL:** <https://forum.ansible.com/t/unable-to-reference-to-local-docker-image/19008>\
**Category:** Ansible Developer\
**Created:** [August 13, 2015, 9:20am UTC](https://forum.ansible.com/t/unable-to-reference-to-local-docker-image/19008 "2015-08-13T09:20:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamesh\_Sampath](https://avatars.discourse-cdn.com/v4/letter/k/f17d59/32.png) [@Kamesh\_Sampath](https://forum.ansible.com/u/Kamesh_Sampath)\
**Post date:** [August 13, 2015, 9:20am UTC](https://forum.ansible.com/t/unable-to-reference-to-local-docker-image/19008/1 "2015-08-13T09:20:18Z")

</div>

I am using Ansible to spin up my local docker container, the task defs are as follows:

`

- name: “Pull the Liferay App”  
shell: docker-compose pull lportal  
args:  
chdir: “{{ compose\_configs\_dir }}/{{ container\_name }}\_{{ application\_db}}”  
environment:  
DOCKER\_HOST: tcp://{{ ip }}:2376  
PATH: “{{ path }}”  
tags: [liferay]

- include: deploy-portal-ext.yml

- name: “Spin up Liferay Container”  
shell: docker-compose up -d lportal  
args:  
chdir: “{{ compose\_configs\_dir }}/{{ container\_name }}\_{{ application\_db}}”  
environment:  
DOCKER\_HOST: tcp://{{ ip }}:2376  
PATH: “{{ path }}”  
tags: [liferay]  
`

My docker-compose is as follows:

`  
db:  
ports:

- 3306  
volumes:
- /var/lib/mysql:/var/lib/mysql  
environment:  
MYSQL\_ROOT\_PASSWORD: “s3ret”  
MYSQL\_DATABASE: “lportal”  
MYSQL\_USER: “lportal”  
MYSQL\_USER\_PASSWORD: “lportal”  
SERVICE\_ID: “lportal-db”  
SERIVCE\_NAME: “Liferay Portal DB”  
SERVICE\_TAGS: “db,mysql,liferay”  
image: mysql

lportal:  
ports:

- 22
- 8080
- 11311  
volumes:
- “/opt/liferay:/liferay”  
environment:  
SERIVCE\_NAME: “Liferay Portal”  
SERVICE\_TAGS: “liferay,6.2-ce-ga4”  
image: dockins\_liferay  
`

When I run my playbook i see a failure saying ‘dockins\_liferay’ not found, but I see the image exists:

`  
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE  
dockins\_liferay latest ca7874816287 54 minutes ago 817.3 MB

`

when I run the docker-compose from CLI directly it seem to work fine.

Docker Info:

> Storage Driver: devicemapper  
> Pool Name: docker-253:1-101374471-pool  
> Pool Blocksize: 65.54 kB  
> Backing Filesystem: xfs  
> Data file: /dev/loop0  
> Metadata file: /dev/loop1  
> Data Space Used: 2.599 GB  
> Data Space Total: 107.4 GB  
> Data Space Available: 14.77 GB  
> Metadata Space Used: 3.981 MB  
> Metadata Space Total: 2.147 GB  
> Metadata Space Available: 2.144 GB  
> Udev Sync Supported: true  
> Deferred Removal Enabled: false  
> Data loop file: /var/lib/docker/devicemapper/devicemapper/data  
> Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata  
> Library Version: 1.02.93-RHEL7 (2015-01-28)  
> Execution Driver: native-0.2  
> Logging Driver: json-file  
> Kernel Version: 3.10.0-229.11.1.el7.x86\_64  
> Operating System: CentOS Linux 7 (Core)  
> CPUs: 1  
> Total Memory: 993.6 MiB

docker-py

> * * *
> 
> Metadata-Version: 1.1  
> Name: docker-py  
> Version: 1.3.1  
> Summary: Python client for Docker.  
> Home-page: [https://github.com/docker/docker-py/](https://github.com/docker/docker-py/)  
> Author: UNKNOWN  
> Author-email: UNKNOWN  
> License: UNKNOWN  
> Location: /usr/lib/python2.7/site-packages  
> Requires: requests, six, websocket-client

Docker compose

> Docker-compose version: 1.3.3  
> CPython version: 2.7.9  
> OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013

Anyone knows why this issue ? IMHO i felt that docker-compose is always going to internet to pull the image but my custom-image is not in internet.

-Kamesh
