Steps to reproduce
- Create a file whose name contains a colon inside a container (common with ISO-8601 timestamps):
container run -d --name cpbox alpine \
sh -c 'echo hi > "/var/log/app-2026-07-20T10:30:00.log"; sleep 300'
- Copy it out:
container cp "cpbox:/var/log/app-2026-07-20T10:30:00.log" ./out.log
Current behavior
Error: invalid path given: cpbox:/var/log/app-2026-07-20T10:30:00.log
The file exists in the container (a colon is a legal character in a Linux path); only the reference parsing fails. Copying a file whose name contains no colon works.
Expected behavior
The file is copied out — matching docker cp, which splits the container:path reference on the first colon only.
Root cause
Application.ContainerCopy.parsePathRef splits the reference on every colon (components(separatedBy: ":")) and rejects anything that produces more than two parts. Any colon in the path (after the id) makes the parse fail. It should split on the first colon only, since a container id cannot contain a path separator.
Environment
- container 1.1.0
- macOS 26.5 (Tahoe), Apple Silicon
Steps to reproduce
Current behavior
The file exists in the container (a colon is a legal character in a Linux path); only the reference parsing fails. Copying a file whose name contains no colon works.
Expected behavior
The file is copied out — matching
docker cp, which splits thecontainer:pathreference on the first colon only.Root cause
Application.ContainerCopy.parsePathRefsplits the reference on every colon (components(separatedBy: ":")) and rejects anything that produces more than two parts. Any colon in the path (after the id) makes the parse fail. It should split on the first colon only, since a container id cannot contain a path separator.Environment