Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Allow configuration of what files are copied into the container for docker compose #8847

Closed
wimdeblauwe opened this issue Jul 4, 2024 · 1 comment

Comments

@wimdeblauwe
Copy link
Contributor

Module

Core

Proposal

The current docker compose support copies all files that are in the directory of the docker compose file into the container that runs the docker compose. This leads to Out Of Memory exceptions in case there are a lot of files in that directory (or subdirectories).

I would like to make it possible to restrict the files that are copied via an inclusion mechanism. I will open a PR with a possible implementation which we then further can discuss.

wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 4, 2024
…containers#8847)

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.
wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 5, 2024
…containers#8847)

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.
wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 13, 2024
…containers#8847)

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.
wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 13, 2024
wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 13, 2024
wimdeblauwe added a commit to wimdeblauwe/testcontainers-java that referenced this issue Jul 13, 2024
@nobvaillant
Copy link

nobvaillant commented Sep 27, 2024

Just a question: is there a reason, why all files of the folder where the compse file is located in, have to be copied per default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants