fussybeaver / bollard

Docker daemon API in Rust
Apache License 2.0
882 stars 133 forks source link

#380: Add streaming image import #411

Closed russelltg closed 3 months ago

russelltg commented 4 months ago

Fixes #380

In general, this allows stream inputs to the docker client, and exposes that for image import.

Open to implementation comments, I'm new to contributing to this project :)

Also wasn't really sure where to put BodyType, it's probably not where you want.

fussybeaver commented 4 months ago

Thanks for this! I'll find some time over the weekend to take a look.

One thing I thought, if the API is easy enough to use and we can provide examples of how to feed a block of bytes into the streaming API then it might just be better to replace the old methods rather than have alternatives.

russelltg commented 4 months ago

Sure. I was looking to not make breaking changes to the API, but considering stream::once exists it would be pretty reasonable to just have one.

fussybeaver commented 3 months ago

LGTM