Add container copy/cp command for host-container file transfer#1190
Add container copy/cp command for host-container file transfer#1190simone-panico wants to merge 25 commits intoapple:mainfrom
Conversation
|
Related to #232 |
|
⏺ Scenario 1:
Scenario 2:
Scenario 3:
Scenario 4:
|
|
Hi @simone-panico The bold italic phrases are what is different from desired behavior (i.e., docker) now, and can be addressed. Below is general comments.
|
|
Hi @simone-panico You may need to build this project with local containerization (BUILDING.md), and wire up |
|
@JaewonHur the change above does not allow copying directories. It adds a tar reader/writer that will be used to support this, but it's not in the change itself. |
|
If you’re interested, I could try to create a Directory Copier within |
Could you describe more how it fails in the middle of writing files? I thought vminitd's
Yes, we might modify current |
I initially thought the first
Sure, just let me know what the team decides and I'll implement it :) |
|
Thanks a lot! :) |
|
Hi @simone-panico we'd like to keep the API change in vminitd as small as possible. Would it be able to achieve it without changing vminitd? |
Hey, yeah sure, I'll try it :) |
|
Following is my pseudo code. Given
Based on it, I thought how the logic would be if we can get an error root cause from the failed copy (going retry approach). Given It's so ugly lol. But, without something like Oh but this logic only works for LOL it's even more ugly. How do you think? |
…estinationIsDirectory
|
Hey @JaewonHur, Thank you for the Pseudo. I also found a bug that I had to fix in 590#containerization, so that PR needs to be merged first. If you and your team change your mind about the |
|
@simone-panico Thanks for all your hard work :) Give me a few more time til we decide the best direction! |
|
Hey @JaewonHur, I hope you're doing great. |
|
Hi @simone-panico sorry for delay 🥲 Once I merge that PR, you can continue working on Let me ping you as soon as I merge that PR! |
|
Hi @simone-panico! I just merged apple/containerization#614, which adds It takes absolute path (outside container environment) and returns stat result of the file system object under that path. This shall help making the logics clean. |
|
Hey @JaewonHur |
|
@simone-panico Thank you! |
|
Hey @JaewonHur, sorry this took so long. I had to finish my finals. |
Type of Change
Motivation and Context
Adds the
container copy(aliased ascp) command to copy files between a running container and the local filesystem.I saw #1023 and the feedback from @dcantah — the previous attempt relied on tar being installed inside the container.
This implementation takes the recommended approach:
file transfers go through the guest agent via the existing
copyIn/copyOutmethods on the coreContainerization, with no dependency on container tooling.Testing