tutorials.TourGuide-App icon indicating copy to clipboard operation
tutorials.TourGuide-App copied to clipboard

How to add the container IP address to hosts file to make it reachable on Windows 8

Open kamilwlf opened this issue 8 years ago • 6 comments

instruction is for linux: https://www.fiware.org/devguides/fiware-tour-guide-application-a-tutorial-on-how-to-integrate-the-main-fiware-ges/ I'm working on windows, how to add the container IP address to hosts file to make it reachable on Windows 8?

now my example does not work: curl -s -X GET -H "Accept: application/json" -H "Fiware-Service: devguide" -H "Content /json" 'http://192.168.99.100:1026/v1/contextEntities/Elizalde'

"contextElement" : { "type" : "", "isPattern" : "false", "id" : "Elizalde" }, "statusCode" : { "code" : "404", "reasonPhrase" : "No context element found", "details" : "Entity id: /Elizalde/" }

kamilwlf avatar Aug 11 '16 06:08 kamilwlf

The hosts file on Windows 8 should be located at C:\Windows\System32\drivers\etc\hosts.

dmabtrg avatar Aug 11 '16 12:08 dmabtrg

What specifically I have to add to this file?

kamilwlf avatar Aug 12 '16 05:08 kamilwlf

You should insert one line for each of the containers, using the following format:

<IP address> <container name>

i.e.:

172.17.0.9    tourguide
172.17.0.7    idas
172.17.0.6    cygnus
172.17.0.8    keyrock
172.17.0.5    orion
172.17.0.4    mysql
172.17.0.3    mongodb mongo
172.17.0.2    authzforce

Please note that the IP addresses listed above are just an example. You can get the IP address of a container with the following command:

docker inspect -f "{{ .NetworkSettings.IPAddress }}" <container-name>

dmabtrg avatar Aug 12 '16 10:08 dmabtrg

thanks, your example works but how to get access to: http://devguide What should I assign to http://devguide/? Which address?

 docker ps
NAMES
tourguide
idas
orion
keyrock
mongodb
authzforce

kamilwlf avatar Aug 12 '16 11:08 kamilwlf

Sorry for the late reply. Where did you see that url? It should be http://tourguide, not http://devguide.

dmabtrg avatar Aug 16 '16 10:08 dmabtrg

@dmabtrg, I'm a bit late too, but I think the confusion comes frome the page https://www.fiware.org/devguides/fiware-tour-guide-application-a-tutorial-on-how-to-integrate-the-main-fiware-ges/, which is in the first post of @kamilwlf .

I ran into the same confusion as it says to access http://devguide, which is wrong.

Is this page maintained by anyone?

LukasCH09 avatar Jan 10 '17 08:01 LukasCH09