Xonshiz / comic-dl

Comic-dl is a command line tool to download manga and comics from various comic and manga sites. Supported sites : readcomiconline.to, mangafox.me, comic naver and many more.
https://github.com/Xonshiz/comic-dl
MIT License
545 stars 68 forks source link

Fix docker build by upgrading pip #275

Closed pagbrl closed 3 years ago

pagbrl commented 3 years ago

Hi,

First of all thanks for the great job on this project !

I built the docker image from master branch and ended up getting an error.

Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-aki3wasa/pikepdf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-peaingry/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-aki3wasa/pikepdf/
You are using pip version 10.0.1, however version 20.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
The command '/bin/sh -c python -m pip install -r /opt/comic-dl/requirements.txt &&     chmod +x /opt/comic-dl/comic_dl/__main__.py  &&     ln -s /opt/comic-dl/comic_dl/__main__.py /usr/local/bin/comic_dl' returned a non-zero code: 1

I included a quick fix for this, commented out unused packages, and switched to python:3.6.5-slim-stretch base image to make the built image a bit lighter. I also removed this line :

FROM base

In the current state of the Dockerfile I don't think this line is useful. There is no multi-stage build as only one image is used and produced by the build for now.

I'm also interested in fixing this error (it appears when running comic_dl from within the built image) :

DEPRECATION: The OpenSSL being used by this python install (OpenSSL 1.1.0l  10 Sep 2019) does not meet the minimum supported version (>= OpenSSL 1.1.1) in order to support TLS 1.3 required by Cloudflare, You may encounter an unexpected Captcha or cloudflare 1020 blocks.

After digging a bit I suspect this has to do with the cloudscraper package, but couldn't find any indications on the project as how to fix this. I can implement a solution if anyone knows where I should look for this.

Let me know if I can help get this merged faster. :)

pagbrl commented 3 years ago

Hi again ! Is there anything I can do to help merge this ? :)

Xonshiz commented 3 years ago

Oops, I had totally overlooked this PR. Thanks for commenting. Let me review the changes and I'll merge :D

Xonshiz commented 3 years ago

Hmm, about cloudscraper package, it's hard to say where to go about it. I might have to re-write certain things in this library to get it working properly. That package seems to be not being actively maintained anymore. Thanks for this PR though :)