PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

DEV: Docker -v mounting but not seeing config file

Open ghost opened this issue 10 years ago • 7 comments

Expected Behavior

Command to launch docker with designated configs/config.json volume mounted.

Actual Behavior

Appears to mount -v, but fails to recognize config file?

Britton@B1 MINGW64 /c/pokemongo-bot (dev) $ docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-brittonreal.json:/usr/src/app/configs/config.json pokemongo-bot [22:10:50] PokemonGO Bot v1.0 [22:10:50] Error: No /configs/config.json or specified config usage: pokecli.py [-h] [-cf CONFIG] -a AUTH_SERVICE [-u USERNAME] [-ws WEBSOCKET_SERVER] [-p PASSWORD] [-l LOCATION] [-lc LOCATION_CACHE] [--catch_pokemon CATCH_POKEMON] [--forts.spin FORTS.SPIN] [-w WALK] [-k GMAPKEY] [-ms MAX_STEPS] [-rp RELEASE_POKEMON] [-d DEBUG] [-t TEST] [-du DISTANCE_UNIT] [-ev EVOLVE_ALL] [-ecm EVOLVE_CP_MIN] [-ec EVOLVE_CAPTURED] [-le USE_LUCKY_EGG] [-rt RECONNECTING_TIMEOUT] [-hr HEALTH_RECORD] [-ac FORTS.AVOID_CIRCLES] [-mcs FORTS.MAX_CIRCLE_SIZE] [--catch_randomize_reticle_factor CATCH_RANDOMIZE_RETICLE_FACTOR] [--catch_randomize_spin_factor CATCH_RANDOMIZE_SPIN_FACTOR] pokecli.py: error: argument -a/--auth_service is required

Steps to Reproduce

https://github.com/PokemonGoF/PokemonGo-Bot/wiki/How-to-run-with-Docker followed steps. cd PokemonGo-Bot docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-brittonreal.json:/usr/src/app/configs/config.json pokemongo-bot

Other Information

OS: Windows7 Using Docker Quickstart Terminal Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here) d5acc7065eabf1f6de884c9dbc41ea89098f52ef

ghost avatar Jul 29 '16 22:07 ghost

https://github.com/boot2docker/boot2docker/issues/846

Try to put a slash /$(pwd)/........

mercuriete avatar Jul 29 '16 23:07 mercuriete

@mercuriete Same error still. Going to try to replicate on my windows 10 machine.

ghost avatar Jul 30 '16 02:07 ghost

I have the same issues

kscheung1228 avatar Jul 30 '16 09:07 kscheung1228

I am using linux and i'm not using the Dockerfile that is in dev. I think someone forgot to add VOLUME /usr/src/app/configs/ to dokerfile.

i will paste mine Dockerfile: (is almost the same but not using python:onbuild) I'm not using the web interface and this is why i am not putting a VOLUME for web folder.

If you are using windows. Kitematic frontend have a tab for editing the volume folders. so what i usually do is... running a container to then modify volume in kitematic.

FROM python:2.7

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

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app

VOLUME ["/usr/src/app/configs"]

ENTRYPOINT ["python", "pokecli.py"]

mercuriete avatar Jul 30 '16 14:07 mercuriete

possibility 1. - already have a config mounted after the the images is built and you have mounted the first config. it can't update. Everytime you changed your config file you have to use a new docker image (i.e. docker rmi (image id) start from docker build again

possibility 2 - Also , the path of configs/config.json may not be applicable... take away the configs

kscheung1228 avatar Jul 31 '16 04:07 kscheung1228

I have the same issues ( In the master branch, the config file is found)

JohanPy avatar Aug 03 '16 13:08 JohanPy

How many of you are using Windows?

ghost avatar Aug 03 '16 19:08 ghost