docker-library / buildpack-deps

MIT License
450 stars 115 forks source link

Add aria2c #89

Closed KOLANICH closed 5 years ago

KOLANICH commented 5 years ago

I suggest to add aria2c to the image and use it in the dependent images instead of curl and wget. aria2c is a multistream downloader which downloads files faster and deals better with connections instabilities.

tianon commented 5 years ago

Under the frame of the image description, where does aria2c fit in?

The main tags of this image are the full batteries-included approach. With them, a majority of arbitrary gem install / npm install / pip install should be successful without additional header/development packages.

Are there gems or packages which use/need aria2c?

We already include both of curl and wget, so it seems like overkill to add yet another file-downloading-tool by default.

KOLANICH commented 5 years ago

aria2c is multistreamed download manager. It opens several connections to multiple servers, which usually results in better speed, if each single download is throttled.

tianon commented 5 years ago

That explains what it is, but doesn't really answer my question about whether it's used directly by any gems/modules/etc.

Given the popularity of curl and wget (compared to this tool which I'm hearing about for the first time in this thread -- nothing against it, but I can't really see the popularity of it matching that of curl or wget which are used in countless scripts/projects across the entire software ecosystem), I'm inclined to not add this now unless/until we can find a popular module which requires it (otherwise we're opening the door for other alternative download managers as well, and this image is already bloated enough as it is).

Thanks!

KOLANICH commented 5 years ago

but I can't really see the popularity of it matching that of curl or wget which are used in countless scripts/projects across the entire software ecosystem

The popularity doesn't match, curl and wget are usually used because aria has a bad CLI - the default settings are useless (not activating multistream download and memory mapped files, for example) and harmful (like file preallocation, should be disabled), I don't remember the spelling of the needed flags and have to look at help (or into my previous shell scripts using aria2c) every time I use it. curl and wget have less friction to use.

I'm inclined to not add this now unless/until we can find a popular module which requires it

What do you mean? Do you need proofs of aria2c popularity? Here they are: 1 2 3 4 5 6 7 8

tianon commented 5 years ago

aria has a bad CLI - the default settings are useless (not activating multistream download and memory mapped files, for example) and harmful (like file preallocation, should be disabled), I don't remember the spelling of the needed flags and have to look at help (or into my previous shell scripts using aria2c) every time I use it. curl and wget have less friction to use.

Honestly this reads to me like a pretty strong recommendation against aria2c, which I imagine probably wasn't your intent?

KOLANICH commented 5 years ago

Honestly this reads to me like a pretty strong recommendation against aria2c, which I imagine probably wasn't your intent?

It is a drawback. But it cannot be a recommendation against aria2c - there is no alternative. Other free open source download managers are either GUI (most of which, but NOT all of them are only GUI forwarding the stuff to aria2c process), or don't support multi-stream downloads. The best what can be done here is to improve aria.

The proposal is to use aria instead of wget/curl for fetching in all the official docker images. It also may make sense to provide a curl and wget-compatible interfaces, so aria to be used automatically without any effort by third-party devs.