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
558 stars 69 forks source link

Suggestion: use docker slim image #212

Closed johnchristopher closed 3 years ago

johnchristopher commented 5 years ago

Using py3.6.5-slim-stretch results in a comic-dl image half the size of the image generated when following instructions from the README and it seems to work very well so far.

You just need to change py3.6.5-stretch to py3.6.5-slim-stretch when building the image and in the Dockerfile.

I am pretty sure alpine could be used but I haven't taken a look yet at which packages are added to the image.

Dorsug commented 5 years ago

The slim image is a good idea. If we change the Dockerfile we should also delete the apt-get -yq upgrade, it is considered as bad practice.

Xonshiz commented 3 years ago

Will look into this. I am not sure how to get that Docker image updated(haven't worked with docker yet)... but I'll take a look. Thanks for the suggestion! P.S: If you folks know how to work around with docker, please take latest and send a PR.. I'll merge it.

johnchristopher commented 3 years ago

@Xonshiz wasn't this committed last year ? https://github.com/Xonshiz/comic-dl/commit/74469ab10ce4ef20b3fee156d27bcaaf39fb5fa6#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557

Regarding the image hosted on docker, unless you already have some kind of CI pipeline from Github to docker, you have to/can upload the image built on your machine to docker hub. https://hub.docker.com/r/kalinon/comic-dl/tags?page=1&ordering=last_updated

Docker recently changed their policies and I hope it's still free for an account to host at least one image :/. On the plus side I suppose you could get an official badge on docker hub. Will look into that.

Xonshiz commented 3 years ago

Ohh I don't remember merging that one at all. Nice catch, man! Thanks :D And nope, I don't have the CI/CD pipeline doing any of that. But let's see if in future it demands, might add it.

So, I'll be closing this one as it's already been merged in 74469ab10ce4ef20b3fee156d27bcaaf39fb5fa6

P.S: No clue who that "Kalinin" is hahah Oh well, doesn't matter.

johnchristopher commented 3 years ago

P.S: No clue who that "Kalinin" is hahah Oh well, doesn't matter.

It's the username of the person (or the account name ?) of the person who uploaded its local build to docker hub.

And nope, I don't have the CI/CD pipeline doing any of that. But let's see if in future it demands, might add it.

I just checked and unfortunately the CI/CD is not free :( Automated Builds

Manually pushing images to Hub? Connect your account to GitHub or Bitbucket to automatically build and tag new images whenever your code is updated, so you can focus your time on creating.

Available on Pro and Team plans.

Anyway, creating an image is just a matter of:

$ git clone https://github.com/Xonshiz/comic-dl ; cd comic-dl
$ docker build -t johnchristopher/comic-dl:py3.6.5-slim-stretch-v2017.12.31 .
$ docker push johnchristopher/comic-dl:py3.6.5-slim-stretch-v2017.12.31

See https://hub.docker.com/r/johnchristopher/comic-dl. I suppose it could easily be automated on your local machine when you tag a release.

I seem to remember there's an auth token dance with the command-line when setting up the account.

Xonshiz commented 3 years ago

Oh I see... thanks for all the info, appreciate it. Like I said, don't really need to include this in CI/CD as of now. But, yeah whoever wants to pull this code to docker... can use whatever's already available. Let's see if I find a use of docker in future for this.. who knows.