Skip to content

Add container volume cp - #963

Open
PhantomInTheWire wants to merge 1 commit into
apple:mainfrom
PhantomInTheWire:feat/containercp
Open

Add container volume cp#963
PhantomInTheWire wants to merge 1 commit into
apple:mainfrom
PhantomInTheWire:feat/containercp

Conversation

@PhantomInTheWire

@PhantomInTheWirePhantomInTheWire commented Dec 16, 2025

Copy link
Copy Markdown

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

related issue: #895

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@PhantomInTheWire
PhantomInTheWireforce-pushed the feat/containercp branch 2 times, most recently from 9e76056 to 8556a39CompareDecember 16, 2025 23:21
@PhantomInTheWire
PhantomInTheWire marked this pull request as ready for review December 16, 2025 23:22
@PhantomInTheWire
PhantomInTheWireforce-pushed the feat/containercp branch 4 times, most recently from 29976e3 to 37b9999CompareDecember 20, 2025 01:43
@PhantomInTheWire
PhantomInTheWireforce-pushed the feat/containercp branch 2 times, most recently from 3e03971 to e83d9b9CompareJanuary 3, 2026 11:41
Signed-off-by: Karan <karanlokchandani@protonmail.com>

@jgloganjglogan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @PhantomInTheWire, sorry that it took a while to get to this one.

See the comment here regarding container cp. The same problem applies to a command like container volume cp.

What you have right now isn't copying into the volume. A volume is a sparse disk image file with an ext4 filesystem written inside it. From what I can tell, your code is copying files around the host (it doesn't build for me as the Archive type isn't found).

To copy in and out of a volume we'd need for the volume to not be used in a running container, and then we'd need to launch a utility container that mounts the volume, and then copy from host to the utility container using the equivalent of container cp.

What could be possible is to add a --from to the container volume create command that allows the user to initialize a new named volume using data on their host.

stephenlclarke added a commit to stephenlclarke/container-compose that referenced this pull request Jul 12, 2026
Supports Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies by staging tar streams through the compose layer and existing Apple path-copy APIs.
Pins stephenlclarke/containerization@79b675d so the runtime carries the apple/container#1927 copy lifecycle regression coverage from apple/containerization#799.
Upstream scan found no direct Docker Compose copy-stream PR to import; adjacent Apple work reviewed: apple/container#963, apple/containerization#652, apple/container#1832, apple/container#1905.
Release-Highlight: Support Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies; includes apple/container#1927 copy lifecycle fix via apple/containerization#799.
Sign up for freeto 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.

2 participants

@PhantomInTheWire@jglogan