PiotrMachowski / Xiaomi-cloud-tokens-extractor

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.
MIT License
3.23k stars 333 forks source link

Run script using docker #6

Closed JakobPetersson closed 3 years ago

JakobPetersson commented 3 years ago

For those who do not have a reasonable python 3 environment.

mikaellindemann commented 3 years ago

A small suggestion would be to add a .dockerignore file to only copy relevant files into the context. E.g. the windows binary is not needed and could be ignored.

JakobPetersson commented 3 years ago

A small suggestion would be to add a .dockerignore file to only copy relevant files into the context. E.g. the windows binary is not needed and could be ignored.

Only requirements.txt and token_extractor.py is copied into the docker image.

mikaellindemann commented 3 years ago

That is true. But when you run docker build, everything not ignored is transferred to dockers build context. This also means that if you change the Readme or the Windows binary, docker cannot use the previously cached layers.

JakobPetersson commented 3 years ago

That is true. But when you run docker build, everything not ignored is transferred to dockers build context. This also means that if you change the Readme or the Windows binary, docker cannot use the previously cached layers.

Thank you! I amended the PR.

PiotrMachowski commented 3 years ago

Nice idea, thanks!