# Errors while building sdist builder image

**URL:** <https://forum.ansible.com/t/errors-while-building-sdist-builder-image/34351>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [December 17, 2020, 11:53pm UTC](https://forum.ansible.com/t/errors-while-building-sdist-builder-image/34351 "2020-12-17T23:53:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cnu\_k](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cnu\_k](https://forum.ansible.com/u/Cnu_k)\
**Post date:** [December 17, 2020, 11:53pm UTC](https://forum.ansible.com/t/errors-while-building-sdist-builder-image/34351/1 "2020-12-17T23:53:09Z")

</div>

We’re trying to build our own awx-web image since need to install custom tools that are not in docker hub image. I was able to install and run successfully on a personal computer but having issues when I tried the same install inside Corporate network/VPN.  
I understand why I see the error and trying to see how others were able workaround this issue.  
The OS admin says that our servers don’t allow HTTP connections but allow HTTPS for these mirrors. Having said that is there a way to update the URLS to use HTTPS protocol or some other approach to move forward?

TASK [image\_build : Build sdist builder image] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /Ansible/awx/installer/roles/image\_build/tasks/main.yml:44  
 ESTABLISH LOCAL CONNECTION FOR USER: localid  
 EXEC /bin/sh -c ‘echo ~localid && sleep 0’  
 EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo /home/localid/.ansible/tmp`”&& mkdir “`echo /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789`” && echo ansible-tmp-1608247016.9-31193-210290861562789=“`echo /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789`” ) && sleep 0’  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker\_image.py  
 PUT /home/localid/.ansible/tmp/ansible-local-28263GuqLKx/tmpquaoa4 TO /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ\_docker\_image.py  
 EXEC /bin/sh -c ‘chmod u+x /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/ /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ\_docker\_image.py && sleep 0’  
 EXEC /bin/sh -c ‘/usr/bin/python /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/AnsiballZ\_docker\_image.py && sleep 0’  
 EXEC /bin/sh -c ‘rm -f -r /home/localid/.ansible/tmp/ansible-tmp-1608247016.9-31193-210290861562789/ \> /dev/null 2\>&1 && sleep 0’  
fatal: [localhost]: FAILED! =\> {  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“api\_version”: “auto”,  
“archive\_path”: null,  
“build”: {  
“args”: {  
“http\_proxy”: “”,  
“https\_proxy”: “”,  
“no\_proxy”: “”  
},  
“cache\_from”: null,  
“container\_limits”: null,  
“dockerfile”: “Dockerfile.sdist”,  
“etc\_hosts”: null,  
“http\_timeout”: null,  
“network”: null,  
“nocache”: false,  
“path”: “/Ansible/awx/installer/roles/image\_build/files”,  
“pull”: false,  
“rm”: true,  
“target”: null,  
“use\_config\_proxy”: null  
},  
“buildargs”: null,  
“ca\_cert”: null,  
“client\_cert”: null,  
“client\_key”: null,  
“container\_limits”: null,  
“debug”: false,  
“docker\_host”: “unix://var/run/docker.sock”,  
“dockerfile”: null,  
“force”: null,  
“force\_absent”: false,  
“force\_source”: true,  
“force\_tag”: false,  
“http\_timeout”: null,  
“load\_path”: null,  
“name”: “awx\_sdist\_builder”,  
“nocache”: false,  
“path”: null,  
“pull”: null,  
“push”: false,  
“repository”: null,  
“rm”: true,  
“source”: “build”,  
“ssl\_version”: null,  
“state”: “present”,  
“tag”: “16.0.0”,  
“timeout”: 60,  
“tls”: false,  
“tls\_hostname”: “localhost”,  
“use\_tls”: null,  
“validate\_certs”: false  
}  
},  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=8 changed=1 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0

[localid@myhost awx]$

fatal: [localhost]: FAILED! =\> {  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“api\_version”: “auto”,  
“archive\_path”: null,  
“build”: {  
“args”: {  
“http\_proxy”: “”,  
“https\_proxy”: “”,  
“no\_proxy”: “”  
},  
“cache\_from”: null,  
“container\_limits”: null,  
“dockerfile”: “Dockerfile.sdist”,  
“etc\_hosts”: null,  
“http\_timeout”: null,  
“network”: null,  
“nocache”: false,  
“path”: “/Ansible/awx//installer/roles/image\_build/files”,  
“pull”: false,  
“rm”: true,  
“target”: null,  
“use\_config\_proxy”: null  
},  
“buildargs”: null,  
“ca\_cert”: null,  
“client\_cert”: null,  
“client\_key”: null,  
“container\_limits”: null,  
“debug”: false,  
“docker\_host”: “unix://var/run/docker.sock”,  
“dockerfile”: null,  
“force”: null,  
“force\_absent”: false,  
“force\_source”: true,  
“force\_tag”: false,  
“http\_timeout”: null,  
“load\_path”: null,  
“name”: “awx\_sdist\_builder”,  
“nocache”: false,  
“path”: null,  
“pull”: null,  
“push”: false,  
“repository”: null,  
“rm”: true,  
“source”: “build”,  
“ssl\_version”: null,  
“state”: “present”,  
“tag”: “16.0.0”,  
“timeout”: 60,  
“tls”: false,  
“tls\_hostname”: “localhost”,  
“use\_tls”: null,  
“validate\_certs”: false  
}  
},  
“msg”: "Error building awx\_sdist\_builder - code: 1, message: The command ‘/bin/sh -c dnf -y update && dnf -y install epel-release && dnf install -y bzip2 gcc-c++ gettext git make nodejs python3 python3-setuptools’ returned a non-zero code: 1, logs: [u’Step 1/7 : FROM centos:8’, u’\n’, u’ —\> 300e315adb2f\n’, u’Step 2/7 : RUN dnf -y update && dnf -y install epel-release && dnf install -y bzip2 gcc-c++ gettext git make nodejs python3 python3-setuptools’, u’\n’, u’ —\> Running in 2e222aab70ee\n’, u"\x1b[91mErrors during downloading metadata for repository ‘appstream’:\n - Status code: 401 for [http://mirrorlist.centos.org/?release=8&arch=x86\_64&repo=AppStream&infra=container](http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container) - Status code: 401 for [http://mirrorlist.centos.org/?release=8&arch=x86\_64&repo=AppStream&infra=container](http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container) - Status code: 401 for [http://mirrorlist.centos.org/?release=8&arch=x86\_64&repo=AppStream&infra=container](http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container) ", u’CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:00 \n’, u"\x1b[91mError: Failed to download metadata for repo ‘appstream’: Cannot prepare internal mirrorlist: Status code: 401 for [http://mirrorlist.centos.org/?release=8&arch=x86\_64&repo=AppStream&infra=container](http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=container) “, u’Removing intermediate container 2e222aab70ee\n’]”

Thanks

---

<div class="post-metadata">

**Author:** ![Cnu\_k](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cnu\_k](https://forum.ansible.com/u/Cnu_k)\
**Post date:** [December 18, 2020, 1:13am UTC](https://forum.ansible.com/t/errors-while-building-sdist-builder-image/34351/2 "2020-12-18T01:13:22Z")

</div>

Realized that I didn’t pay attention to proxy settings in install doc, will set http\_proxy and https\_proxy values and give it a try.

---

<div class="post-metadata">

**Author:** ![Cnu\_k](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cnu\_k](https://forum.ansible.com/u/Cnu_k)\
**Post date:** [December 18, 2020, 5:42pm UTC](https://forum.ansible.com/t/errors-while-building-sdist-builder-image/34351/3 "2020-12-18T17:42:06Z")

</div>

Ran into another issue but dnf package installs were successful when I added http\_proxy and https\_proxy entries to the inventory file.
