testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
7.9k stars 1.62k forks source link

Allow copy specific files to docker compose #8848

Closed wimdeblauwe closed 5 days ago

wimdeblauwe commented 2 weeks ago

This commit adds support for a withFileCopyInclusions method on ComposeContainer and DockerComposeContainer. It allows to specify what files or directories should be copied, instead of just copying all files. If not used, the current behaviour is preserved.

eddumelendez commented 1 week ago

Hi @wimdeblauwe, thanks for your contribution! I think this is a nice improvement. Do you mind adding some docs here and tests as well, please?

wimdeblauwe commented 1 week ago

@eddumelendez Thanks for considering my PR! I have added documentation and tests now.

eddumelendez commented 1 week ago

great! thanks! Running ./gradlew spotlessApply should fix the build.

wimdeblauwe commented 1 week ago

@eddumelendez build is ok now.

eddumelendez commented 5 days ago

Thanks for your contribution, @wimdeblauwe ! I made some changes and rename the method.