You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How should I copy a file from a container to another container? #5403
My use case: I have a containerized service that runs in a container. This service has several integration tests that make use of test containers. Some of these containers need to be able to read a file before starting so in the initialization of the GenericContainer I would use withCopyFileToContainer(MountableFile.forClassPathResource(...)) to copy a file from the container in which the tests run to the test container, but this does not work. The file is not being copied. I assume withCopyFileToContainer only works if it is being invoked on the host.
Activity
aidando73 commentedon Aug 25, 2022
Hi @csa777 do you have a code snippet of what you mean? I'm having a trouble visualizing your setup.