lorenzodifuccia / safaribooks

Download and generate EPUB of your favorite books from O'Reilly Learning (aka Safari Books Online) library.
Do What The F*ck You Want To Public License
4.62k stars 685 forks source link

Add docker support #242

Open volkan opened 3 years ago

volkan commented 3 years ago

Without any special installation we will be able to download a book with the following command

docker-compose run safaribooks python3 safaribooks.py --cred "account_mail@mail.com:password01" XXXXXXXXXXXXX
rufanov commented 3 years ago

I really don't think it's convenient way to run this project. Yes, it's possible to docker'ize everything in the world, but docker designed for horizontal application scaling and CI. It's overcomplicated to use it for running just simple "single-use" python scripts.

Also both docker and docker-compose project do require python to be installed - so this doesn't solve anything at all.

volkan commented 3 years ago

I really don't think it's convenient way to run this project. Yes, it's possible to docker'ize everything in the world, but docker designed for horizontal application scaling and CI. It's overcomplicated to use it for running just simple "single-use" python scripts.

Also both docker and docker-compose project do require python to be installed - so this doesn't solve anything at all.

Frankly, I was having a problem with my python installation, I used docker rather than fixing the python installation. Then, I thought, it maybe can help someone else too and I did MR.

siddhantvirus commented 3 years ago

Honestly, I was revisiting this project , and I too was considering to dockerize the project and add a volume mount to make sure that the books get saved in our host machine. The whole point of using docker, in this case, is to ensure that there are no install steps required. I agree we do need python for docker-compose, but what if we just skip docker-compose and add the volume mount directly to the docker run command? it's harmless in my opinion. Plus your requirements file mentions python 3.6 specifically, and those with a different version might not want the entire hassle of multiple versions or using venv

In any case, kudos for making this project! And I'm sure people would use it only for educational purposes :'3

PaulDMooney commented 2 years ago

I'm on a Mac, using Docker Desktop. I don't believe I have the correct version of Python to run this project so yes, this docker option is nice. And no, I don't think being able to run docker-compose means I have the correct Python on my host-OS already since docker is running in a VM (though I may be wrong).