apple / apple/container

[Request]: machine command cp support

Open
#2,141 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
49.9k
Forks
1.8k
Avg merge
1d 20h
Merged PRs (30d)
22

Description

### Feature or enhancement request details

Please add cp support to container machine

### Background

Now to copy file to container machine with `--home-mount` set to `none `, we must get `Container ID` first like
```
container stats --no-stream

#return
Container ID Cpu % Memory Usage Net Rx/Tx Block I/O Pids
dev-ea69cb 0.15% 661.23 MiB / 4.00 GiB 6.11 MiB / 3.72 MiB 606.94 MiB / 20.59 MiB 11
```
copy file with the `Container ID`
```
container cp ./README.md dev-ea69cb:/root/
```

### Proposed behavior
container machine support file copy by machine name
```
container machine cp ./README.md dev:/root/
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by comparing the existing `container cp` command with the `container machine` command entry point. Implement the proposed `container machine cp ./README.md dev:/root/` behavior, then verify that a file can be copied by machine name when `--home-mount` is `none`, without first looking up a container ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.