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 14 commits intoapple:mainfrom
Conversation
|
Related to #232 |
Sources/Services/ContainerAPIService/Client/ContainerClient.swift
Outdated
Show resolved
Hide resolved
Sources/Services/ContainerAPIService/Client/ContainerClient.swift
Outdated
Show resolved
Hide resolved
Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift
Show resolved
Hide resolved
Sources/Services/ContainerAPIService/Server/Containers/ContainersService.swift
Show resolved
Hide resolved
|
⏺ 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 |
|
@JaewonHur @dcantah, I created apple/containerization#543 for clarity. As soon as apple/containerization#474 is merged I think I could start with implementing the directory copying. What do you think? |
|
Hi @simone-panico, sorry for the delay! We have an internal discussion how to better support |
|
Hey Guys, I experimented a bit with the ContainerizationTar and got a running version for Copying Directories #563. It would be great if you could give me a short Feedback if that is the right way to go |
|
Hi @simone-panico, sorry for the late reply! We finally merged support copying directory in containerization (apple/containerization#571). Previously, we did custom implementation of tar reader/writer (apple/containerization#474) for vminitd (which runs in linux VM) as the swift linux sdk didn't include libarchive. You would be able to check it under apple/containerization#571, and we can continue this PR to add full support for |
|
Here is test script. |
|
Current test result |
|
|
Yes, I already saw it, but Thank you very much 😄 |
|
Thank you! :) |
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