# About using  docker.io/ansible/ansible:httptester

**URL:** <https://forum.ansible.com/t/about-using-docker-io-ansible-ansible-httptester/27127>\
**Category:** Ansible Project\
**Created:** [March 27, 2018, 1:42pm UTC](https://forum.ansible.com/t/about-using-docker-io-ansible-ansible-httptester/27127 "2018-03-27T13:42:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albert\_Shamsiyan](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Albert\_Shamsiyan](https://forum.ansible.com/u/Albert_Shamsiyan)\
**Post date:** [March 27, 2018, 1:42pm UTC](https://forum.ansible.com/t/about-using-docker-io-ansible-ansible-httptester/27127/1 "2018-03-27T13:42:38Z")

</div>

Hi

I’m trying to use [docker.io/ansible/ansible:httptester](http://docker.io/ansible/ansible:httptester).  
When /services.sh is executed, following errors are prompted:

2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:80 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:443 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:80 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:443 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:80 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:443 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:80 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:443 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:80 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: bind() to 0.0.0.0:443 failed (98: Address in use)  
nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address in use)  
2018/03/27 13:39:46 [emerg] 43#43: still could not bind()  
nginx: [emerg] still could not bind()

– Already verified that both ports 443 and 80 are NOT occupied by executing following commands:

- sudo fuser -k 80/tcp
- sudo fuser -k 443/tcp

Any Idea about this?

THX - Albert

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [March 27, 2018, 2:23pm UTC](https://forum.ansible.com/t/about-using-docker-io-ansible-ansible-httptester/27127/2 "2018-03-27T14:23:31Z")

</div>

When using the container that is on docker hub, there is no need to run services.sh. The “CMD” in the Dockerfile will run services.sh automatically.

The image exposes 80/443, but you also have to instruct docker to publish them. Such as `-p 80:80 -p 443:443`:

$ docker run --rm -d -p 80:80 -p 443:443 ansible/ansible:httptester

c1b5a01de4eff64832e7082d6441a6a1671aa195710db08f4accd692ffb1eae1

$ curl [http://localhost:80/get](http://localhost:80/get)  
{  
“args”: {},  
“headers”: {  
“Accept”: “_/_”,  
“Connection”: “close”,  
“Host”: “localhost”,  
“User-Agent”: “curl/7.54.0”  
},  
“origin”: “172.17.0.1”,  
“url”: “[http://localhost/get](http://localhost/get)”  
}

There is a little info about the image and building it at [http://docs.ansible.com/ansible/devel/dev\_guide/testing\_httptester.html](http://docs.ansible.com/ansible/devel/dev_guide/testing_httptester.html)

Also: [https://github.com/ansible/ansible/tree/devel/test/utils/docker/httptester](https://github.com/ansible/ansible/tree/devel/test/utils/docker/httptester)

I’m not positive what you plan on using it for, but do note that it was purpose built with the intent of using it as a testing endpoint for us.
