-
Notifications
You must be signed in to change notification settings - Fork 172
Description
Summary
Currently testcontainers provides CopyToContainer for transferring files into a container, but there is no corresponding API to copy files from a running container back to the host.
This feature would align the Rust implementation with the Java version, which already supports this behavior.
Motivation
In many integration tests, it’s useful to retrieve generated artifacts, logs, or configuration files from inside a container after execution.
At the moment, users need to manually use bollard::Docker::download_from_container as a workaround.
Reference
The Java implementation offers similar functionality:
https://java.testcontainers.org/features/files/
Proposal
Add an API such as CopyFromContainer, allowing users to copy files or directories from a container path to a host path.
This could leverage the existing bollard client already exposed in recent versions.
Notes
I'm happy to contribute this feature when time allows, and would also welcome anyone else who needs this to pick it up.
Thanks for maintaining this excellent project!