`docker cp` into a sysbox-runc container fails with "Could not find the file"
@ctalledo is already working on this.
Since Jun 4, 2026.
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
docker cp into a sysbox-runc container fails with "Could not find the file"
Description
When a container is run with --runtime=sysbox-runc, any docker cp into
that container fails — including paths that clearly exist in the image
and paths created at runtime. The same image works fine with the default
runc runtime, so the bug is in sysbox-runc, not in the image or in the
Docker daemon.
The container itself is healthy: docker exec can list, read and write
the same paths without issue. The mismatch suggests the daemon's view of
the container rootfs is no longer in sync with what the container
actually sees after sysbox-runc finishes setting up.
This breaks any tool that relies on the Docker CopyToContainer API.
The original report that led me here was docker compose watch, which
uses that API to sync source files into a running container — but the
issue is much more general.
Steps to reproduce
docker run -d --runtime=sysbox-runc --name repro alpine sleep 3600
# any docker cp into the container fails
echo hi > /tmp/x
docker cp /tmp/x repro:/x
# Error response from daemon: Could not find the file / in container repro
docker cp /tmp/x repro:/tmp/x
# Error response from daemon: Could not find the file /tmp in container repro
# control: same image, default runtime, works fine
docker rm -f repro
docker run -d --name repro alpine sleep 3600
docker cp /tmp/x repro:/x # OK
Inside the container, the paths exist and are writable:
docker exec repro sh -c 'ls -la / ; echo > /from-exec && ls -la /from-exec'
# / and /from-exec both visible
Environment
OS: Ubuntu 24.04, kernel 6.17.0-20-generic
Docker: 29.5.2 (server)
runc: 1.3.5
sysbox-runc: 0.7.0 CE (commit a4dd414f7b9b7455c0fbf0d5e5db7bcfe30645bc,
built Tue Mar 3 21:51:47 UTC 2026)
containerd: v2 with overlayfs snapshotter
Relevant Docker daemon config (needed so that sysbox-runc starts at all
on Docker 29.5.x, but unrelated to this bug):
{
"runtimes": { "sysbox-runc": { "path": "/usr/bin/sysbox-runc" } },
"features": { "time-namespaces": false }
}
Expected behavior
docker cp <src> <container>:<dest> should write the file to <dest>
inside the container, the same way it does with the default runc
runtime.
Actual behavior
The daemon's ContainerStatPath call returns "not found" for every
path in the container, including /. Nothing can be copied in.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.