Skip to content

[Request]: container cp into a created but not yet started container #2404

Open

Description

@delgadof

Feature or enhancement request details

Allow container cp <host-path> <container>:<path> for a container in the created (never started) state, as Docker does. Today cp requires a running container.

Use case

A sandbox orchestrator needs to place per-launch configuration (TLS material, bootstrap config) into a sandbox before its entrypoint runs. Without cp on a created container, it shares a read-only host folder with the VM and has an init helper copy the files in at boot.

Tested with container 1.5.0 on macOS 27.0.1.

Activity

  1. gerardrecinto commented on Oct 17, 2026

    @gerardrecinto

    Hi @dcantah, would you be open to me investigating this for a PR? I'd keep the initial scope to copying host files into a created, never-started container before its entrypoint runs.

    Before implementing it, I'd trace the copy/runtime path and check whether this needs changes in containerization. Is there a preferred way to make the root filesystem accessible for the copy without starting the workload? I'd include coverage for the created state and copy failures, and account for the copy-path hardening already proposed in #2389.

    If nobody is working on this, could you assign it to me (@gerardrecinto) and confirm the approach before I open a PR?

    Thanks
    Gerard Recinto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions