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

Handle large files with copyFileToContainer #2864

Conversation

findepi
Copy link
Contributor

@findepi findepi commented Jun 12, 2020

Fixes #2863

@findepi findepi force-pushed the findepi/master/handle-large-files-with-copyfiletocontainer-c97ba6 branch from 56758bd to 46ff43b Compare June 12, 2020 21:27

transferable.transferTo(tarArchive, containerPath);
tarArchive.finish();
Path tarFile = Files.createTempFile("test-containers-copy-file-to-container", ".tar");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it is better to use PipedInputStream

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker Java creates a temp file anyway, so we are not winning much.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is something I am willing to fix in docker-java as well :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we change this here now, so that we can avoid temp file creation altogether once docker-java is changed?

@findepi
Copy link
Contributor Author

findepi commented Jun 29, 2020

I switched to use binds for large files and copy for configuration files, so I do not need the change.
Someone may want to pick this up and finish.

@findepi findepi closed this Jun 29, 2020
@findepi findepi deleted the findepi/master/handle-large-files-with-copyfiletocontainer-c97ba6 branch June 29, 2020 22:54
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

Successfully merging this pull request may close these issues.

OutOfMemoryError when copyFileToContainer used on large file
3 participants