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

Docker - error: argument -a/--auth_service is required

Open kscheung1228 opened this issue 10 years ago • 10 comments

Expected Behavior

Avator to run

Actual Behavior

error: argument -a/--auth_service is required

Steps to Reproduce

maybe a dumb question.... how come we have so many config.json from the docker command ?

In the wiki it ask us to run the below.... docker run --name=pokego-bot1 --rm -it -v $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json pokemongo-bot I believe the first "configs/config-account1.json" refers to the json file, how about the second "configs/config.json" ??

Other Information

OS: Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)

kscheung1228 avatar Jul 28 '16 16:07 kscheung1228

/usr/src/app/configs/config.json refer to the josn inside the container. By doing -v $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json, you replace /usr/src/app/configs/config.json by your $(pwd)/configs/config-account1.json inside the container.

However, if you build your Docker image from PokemonGo-Bot/directory with docker build -t pokemongo-bot ., your config should already be inside the container. So you don't need the -v option

Lunik avatar Jul 28 '16 16:07 Lunik

@Lunik I am also getting this error. After building, and executing the run command without the -v flag, it gives me this error: Command Executed:

docker run --name=pokego-bot1 --rm -it $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json pokemongo-bot

Result:

docker: Error parsing reference: "~/PokemonGo-Bot/configs/config-account1.json:/usr/src/app/configs/config.json" is not a valid repository/tag.
See 'docker run --help'.

(replaced my home path with ~/)

dsevillamartin avatar Jul 28 '16 16:07 dsevillamartin

thanks @Lunik ... so in $(pwd)/configs/config-account1.json should I replace (pwd) with my password which is already in the json file (currently its named under configs/config-account1.json??

kscheung1228 avatar Jul 28 '16 17:07 kscheung1228

@datitisev You should also the -v option parameter: $(pwd)/configs/config-account1.json:/usr/src/app/configs/config.json

Lunik avatar Jul 28 '16 17:07 Lunik

It worked executing

$ docker run --name=pokego-bot1 --rm pokemongo-bot -cf configs/config-account1.json

The -cf flag was needed, for some reason whenever I used the -a flag it said unknown, but it wanted me to put it... Thanks!

dsevillamartin avatar Jul 28 '16 17:07 dsevillamartin

@Lunik Although now it's saying

IMPORTANT: Rename and configure release_config.json.example for your Pokemon release logic first!

when I've renamed release_config.json.example to release_config.json

dsevillamartin avatar Jul 28 '16 17:07 dsevillamartin

@datitisev - what is the filename of your config file ?? config-account1.json or configs/config-account1.json ?

kscheung1228 avatar Jul 28 '16 17:07 kscheung1228

Sorry I didn't update on this, but it now works using this command:

docker run namlehong/alpine-pgo:dev -a tcp -u username -p 1234 -l "Atlantic Ocean"

dsevillamartin avatar Jul 28 '16 18:07 dsevillamartin

However I want to say something about the Docker image. We use python:2.7-onbuild if I'm right.

But after doing docker build -t pokebotgo ., the configs/config.json is not copied into the container... Is it my mistake ?

Lunik avatar Jul 28 '16 21:07 Lunik

come to slack chat #help and someone can help you NOT A BUG

gregtampa avatar Jul 30 '16 09:07 gregtampa