-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve docker usage; use docker-compose for starting the PokemonGo-B…
…ot ecosystem (#1669) * update Dockerfile; install missed python-protobuf package; add CMD as a way of defining default arguments for the ENTRYPOINT * remove CMD command, default config parameter is also set in pokecli.py * improve docker usage; add single container run for the webUI; add docker-compose.yml for starting the bot ecosystem with one command * fix "How to run with Docker" link * fix timezone setting: send timezone arg to the docker image build process, e.g. "docker build --build-arg timezone=Europe/Berlin -t pokemongo-bot ."
- Loading branch information
1 parent
b9aff7a
commit 872dfa5
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
.git* | ||
configs/config.json | ||
**/*config.json | ||
**/*userdata.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
FROM python:2.7-onbuild | ||
|
||
ARG timezone=Etc/UTC | ||
RUN echo $timezone > /etc/timezone \ | ||
&& ln -sfn /usr/share/zoneinfo/$timezone /etc/localtime \ | ||
&& dpkg-reconfigure -f noninteractive tzdata | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y python-protobuf | ||
|
||
VOLUME ["/usr/src/app/web"] | ||
|
||
ENTRYPOINT ["python", "pokecli.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: '2' | ||
services: | ||
bot1-pokego: | ||
build: . | ||
volumes: | ||
- ./configs/config.json:/usr/src/app/configs/config.json | ||
stdin_open: true | ||
tty: true | ||
bot1-pokegoweb: | ||
image: python:2.7 | ||
ports: | ||
- "8000:8000" | ||
volumes_from: | ||
- bot1-pokego | ||
volumes: | ||
- ./configs/userdata.js:/usr/src/app/web/userdata.js | ||
working_dir: /usr/src/app/web | ||
command: bash -c "echo 'Serving HTTP on 0.0.0.0 port 8000' && python -m SimpleHTTPServer > /dev/null 2>&1" | ||
depends_on: | ||
- bot1-pokego |
872dfa5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still getting errors
url used for image:
https://hub.docker.com/r/babfrag/docker-pokemongobot/
872dfa5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not Alpine Linux? It is recommended for smaller images.
I've made this one with someone else and it works well : https://hub.docker.com/r/arckosfr/pokemongobot/
872dfa5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also have a look here: https://hub.docker.com/r/joergpatz/pokegobot/
872dfa5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Wonderfall still a noob regarding docker, the webserver isn't really working. Have an config file but looks like the server isn't being spawned. also the bot keeps crashing
and thanks @joergpatz that works!
872dfa5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nivong I have no problem. Perhaps because you're using the
dev
branch, we prefer to stay with stable features so we keep using themaster
branch.If I remember correctly the old Dockerfile was using Alpine Linux. Docker official images will switch to Alpine due to its small size, and the officiel
python
image has already an alpine tag.