# Docker issue while running Awx installer

**URL:** <https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [May 22, 2019, 8:06pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402 "2019-05-22T20:06:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Praveen\_Kumar](https://forum.ansible.com/u/Praveen_Kumar)\
**Post date:** [May 22, 2019, 8:06pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/1 "2019-05-22T20:06:03Z")

</div>

Hi,

My Installer fails with the error message below . The message in itself is clear that the server can’t reach out to docker hub. Our environment has it’s own docker registry and we block access to Internet from the corporate network.  
What parameters/variables can I modify in the playbook, so that the playbook uses the local docker registry instead of the public one ? I have already setup authentication from the client to registry and placed my image files in our  
local repository… Please help.

TASK [local\_docker : Start the containers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [localhost]: FAILED! =\> {“changed”: false, “errors”: , “module\_stderr”: “”, “module\_stdout”: “Pulling repository [docker.io/library/memcached](http://docker.io/library/memcached)\n”, “msg”: “Error starting project Network timed out while trying to connect to [https://index.docker.io/v1/repositories/library/memcached/images](https://index.docker.io/v1/repositories/library/memcached/images). You may want to check your internet connection or if you are behind a proxy.”}

The playbook role related to the task above is image\_build .

- { role: image\_build, when: “dockerhub\_base is not defined” }

---

<div class="post-metadata">

**Author:** ![Uriel](https://avatars.discourse-cdn.com/v4/letter/u/53a042/32.png) [@Uriel](https://forum.ansible.com/u/Uriel)\
**Post date:** [May 22, 2019, 8:43pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/2 "2019-05-22T20:43:45Z")

</div>

Did you try setting the docker\_registry variables in the inventory file?

# docker\_registry=172.30.1.1:5000

# docker\_registry\_repository=awx

# docker\_registry\_username=developer

---

<div class="post-metadata">

**Author:** ![David\_Maple](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@David\_Maple](https://forum.ansible.com/u/David_Maple)\
**Post date:** [May 23, 2019, 11:29am UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/3 "2019-05-23T11:29:29Z")

</div>

The log indicates it is downloading the memcached image. It does need to get that from dockerhub. Only the awx images are built locally. If you import the memcached image into your docker registry, try a recursive grep through the awx install tree to find the tasks that download it. You may find a variable or you may have to modify the task.

Make sure you don’t have the variable dockerhub\_base defined in your inventory.

Dave

---

<div class="post-metadata">

**Author:** ![Praveen\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Praveen\_Kumar](https://forum.ansible.com/u/Praveen_Kumar)\
**Post date:** [May 24, 2019, 9:29pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/4 "2019-05-24T21:29:34Z")

</div>

Thanks . I tried changing the docker registry variable to the ip addr/hostname of our internal docker registry, but it still fails with the same error .

---

<div class="post-metadata">

**Author:** ![Praveen\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Praveen\_Kumar](https://forum.ansible.com/u/Praveen_Kumar)\
**Post date:** [May 24, 2019, 9:44pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/5 "2019-05-24T21:44:47Z")

</div>

Thanks David. If I don’t define dockerhub\_base=ansible which is the default value from the git project, The playbook fails even before local\_docker role gets executed .

TASK [image\_build : Build sdist builder image] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “msg”: “Error building awx\_sdist\_builder - code: None, message: Network timed out while trying to connect to [https://index.docker.io/v1/repositories/library/centos/images](https://index.docker.io/v1/repositories/library/centos/images). You may want to check your internet connection or if you are behind a proxy., logs: [u’Step 1 : FROM centos:7\n’]”}

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [May 31, 2019, 6:10pm UTC](https://forum.ansible.com/t/docker-issue-while-running-awx-installer/30402/6 "2019-05-31T18:10:10Z")

</div>

Just changing the base var in inventory isn’t going to help… we don’t have any parameter that will change the location of dependent images. You’d need to change those in the playbook by hand, there are a few in the template file, look for the image lines… here’s the one for memcached

[https://github.com/ansible/awx/blob/devel/installer/roles/local\_docker/templates/docker-compose.yml.j2#L121](https://github.com/ansible/awx/blob/devel/installer/roles/local_docker/templates/docker-compose.yml.j2#L121)
