podman cp fails for image-mount subpaths on created containers
Author: pooyanazadCreated Sep 29, 2026Updated Sep 29, 2026
@Honny1 reported this while reviewing #29842 (original comment).
With type=image,subpath=/bin, copying /mnt/ls from a created container fails with ENOENT. The same copy succeeds after the container starts.
Reproducer from the review:
ctr="img-cp-test"
./bin/podman rm -f "$ctr" 2>/dev/null
./bin/podman create --name "$ctr" --network=none --mount "type=image,source=alpine,dst=/mnt,subpath=/bin" alpine sleep 3600
./bin/podman cp "$ctr:/mnt/ls" /tmp/from-created
# Error: no such file or directory
./bin/podman start "$ctr"
./bin/podman cp "$ctr:/mnt/ls" /tmp/from-running
# succeeds
./bin/podman exec "$ctr" ls -l /mnt/ls
./bin/podman rm -f "$ctr"Expected: podman cp should find /mnt/ls in the created container too.
This is separate from #29840, which covers named-volume subpaths. The review used ./bin/podman; full podman info was not provided.
Source: podman-container-tools/podman