Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to read a file from the container by chunks #575

Open
ianfixes opened this issue May 5, 2021 · 0 comments
Open

Ability to read a file from the container by chunks #575

ianfixes opened this issue May 5, 2021 · 0 comments

Comments

@ianfixes
Copy link
Contributor

ianfixes commented May 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant