Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker no map for web #4083

Closed
supercourgette opened this issue Aug 16, 2016 · 3 comments
Closed

Docker no map for web #4083

supercourgette opened this issue Aug 16, 2016 · 3 comments

Comments

@supercourgette
Copy link
Contributor

supercourgette commented Aug 16, 2016

Hi, I have an issue with Docker under Windows. I cannot access the web map.

Expected Behavior

When browsing http://192.168.99.100:8000/, seeing the pokemonGo-BOT directory, in order to access the web directory.

Actual Behavior

When browsing http://192.168.99.100:8000/, I access a directory with only a few files:
capture

Your FULL config.json (remove your username, password, gmapkey and any other private info)

Not relevant here. Instead here is my docker ps:

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
dfbac7152492        python:2.7          "python -m SimpleHTTP"   4 minutes ago       Up 4 minutes        0.0.0.0:8000->8000/tcp   bot1-pokegoweb
3f96c3b7975c        pokemongo_bot       "python pokecli.py"      About an hour ago   Up About an hour                             bot1-pokego

We can see there is a port forwarding from bot1-pokemonweb container to the port 8000.

Output when issue occurred

$ docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:8000 -v $(pwd)/configs/userdata.js:/usr/
src/app/web/userdata.js -w /usr/src/app/web python:2.7 python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
192.168.99.1 - - [16/Aug/2016 13:47:15] "GET / HTTP/1.1" 200 -
192.168.99.1 - - [16/Aug/2016 13:51:44] "GET / HTTP/1.1" 200 -
192.168.99.1 - - [16/Aug/2016 13:51:45] "GET / HTTP/1.1" 200 -
192.168.99.1 - - [16/Aug/2016 13:51:46] "GET /catchable-metapatate.json HTTP/1.1" 200 -

The GET request are fired when I click one of the files or refresh the page.

Steps to Reproduce

Follow the installation of Docker under Windows as describe in the documentation. The problem occurs after entering the following command:

docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:8000 -v $(pwd)/configs/userdata.js:/usr/src/app/web/userdata.js -w /usr/src/app/web python:2.7 python -m SimpleHTTPServer

Other Information

OS:
Windows 10 64b
Branch:
dev
Git Commit:

$ git log -n 1 --pretty=format:"%H"
7d0da5a2a400e3dc9f7696d9886de039d7b890ab

Python Version:

$ python -V
Python 2.7.12

Any other relevant files/configs (eg: path files)

Just in case, I tried to access http://localhost:8000/, but there was nothing there. The host information of the container were retrieved using the following command:

$ docker-machine ip default
192.168.99.100

Thanks in advance for your help :)

@thementos
Copy link

must add ip on google map api

@supercourgette
Copy link
Contributor Author

What do you mean?

@supercourgette
Copy link
Contributor Author

Ok I got it. The bot container must mount the web directory in order for the map container to use it.

Here is the full command:

Container 1 (bot)
docker run --name=bot1-pokego --rm -it -v $(pwd)/configs/config.json:/usr/src/app/configs/config.json -v $(pwd)/web/:/usr/src/app/web/ pokemongo_bot

Container 2 (map)
docker run --name=bot1-pokegoweb --rm -it --volumes-from bot1-pokego -p 8000:8000 -v $(pwd)/configs/userdata.js:/usr/src/app/web/userdata.js -w /usr/src/app/web python:2.7 python -m SimpleHTTPServer

Then you can access the map at the host address (http://192.168.99.100:8000/ in my case).

I think the wiki should be updated with those information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants