Make your own Pokemon Go map radar with docker on Ubuntu 14

0. Introduction

Rencently I am learning to use Docker which is very helpful to isolate apps to keep the OS clean. So I searched for interesting applications of Docker. Then I found the Pokemon Go Map from Github. This article is to take notes on the installation process of pokemon go map with docker on Ubuntu 14.

1. Installing Docker on Ubuntu 14.04

The installation of docker follows with the instruction of Docker's doc:

Default coordinates, can be found on Google Maps by simply clicking on any place you're interested.

When all ready, run the following command as root：

$ docker run -d -p xxxx:5000 --name pogomap \ #xxxx is the port on the host, while 5000 is the port in the container
sych74/pokemongo-map \ #Sometimes you can't find this image, but there's other similar one on the Docker Hub
-a ptc -u username_of_PTC -p password_of_PTC \
-k 'google-maps-key' \
-l 'default coordinates' \
-st 5 #It's better to use 10, because my ip is blocked after a week later when I used 5.
#The pogomap image should be pulled back and running right now. If you want to check the status:
$ docker logs -f pogomap #When you found the message looks like the following, it mean the server is properly running. Otherwise, you will need to check if your PTC account or Google-maps-key.
2016-08-10 08:32:16,506 [ search_worker_0][ search][ INFO] Search step 3 beginning (queue size is 58)
2016-08-10 08:32:17,512 [ search_worker_0][ models][ INFO] Upserted 0 pokemon, 504 pokestops, and 16 gyms
# If need to use the bash in the container:
$ docker exec -ti pogomap bash

3. Configure Nginx as reverse proxy to point a sub-domain to Pogomap

Edit or create the configuration file of the sub-domain site under /etc/nginx/sites-available/：

PS: The Pogomap wiki says SSL is needed when using location services. However, if you are using Cloudflare just like me, then you have the free SSL already. There is no need to listen to 443 in the Nginx, but you need to set the website to force using HTTPS in the Cloudflare.