EFForg / badger-sett

Automated training for Privacy Badger. Badger Sett automates browsers to visit websites to produce fresh Privacy Badger tracker data.
https://www.eff.org/badger-pretraining
MIT License
119 stars 13 forks source link

Docker not working #76

Closed MrBrain295 closed 10 months ago

MrBrain295 commented 10 months ago

When I try to run it I get this error ERROR: failed to solve: failed to parse stage name "selenium/standalone-/vscode/bin/linux-x64/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/helpers/browser.sh": invalid reference format Docker build failed.

ghostwords commented 10 months ago

Does this happen during docker build? It looks like your "$BROWSER" environment argument isn't set.

https://github.com/EFForg/badger-sett/blob/5837e2d080a2265c73210b2bb1764cf9f0824096/runscan.sh#L74-L75

https://github.com/EFForg/badger-sett/blob/5837e2d080a2265c73210b2bb1764cf9f0824096/Dockerfile#L4

And then Docker looks for "selenium/standalone-/..." where it should be looking for "selenium/standalone-firefox/..." or whatever .

I think our README is confusing and/or missing some information. Sorry about that!

You should be able to fix your error by prepending your runscan.sh command with BROWSER=chrome (or firefox, or edge).

You can also run crawler.py directly without Docker. You'll just have to set up your pip environment from requirements.txt and check out the Privacy Badger repository yourself and provide a bunch of arguments to crawler.py. For example:

$ ./crawler.py --num-sites 20 --browser chrome --pb-dir ../privacybadger --take-screenshots --log-stdout

Let me know if you have any questions.

MrBrain295 commented 10 months ago

That worked. Thank you!