Ability to read a file from the container by chunks
ianfixes opened this issue · 0 comments
ianfixes commented
This function will read the contents of a file from a DockerContainer
:
https://github.com/swipely/docker-api/blob/a322b83e44a8e46a70a166a6c84a0b8d1080ddfe/lib/docker/container.rb#L300-L313
However, it returns them as a string. Can a variant of this be added such that (if a block is given) a function such as archive_out_stream
can be used to pass the un-tarred file contents to a given block, chunk by chunk? I'm concerned that opening large files in this way will cause out-of-memory issues.