-
Hi @cristianrgreco , I'm parsing a
What do you advise so that when using your library with a docker-compose file it sets a random suffix (or at least a suffix) so it does not conflict with a local Otherwise I thought about setting an environment variable in the Thank you for sharing your thoughts on this :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @sneko, no there isn't a way. This is just how docker-compose works, if you tried to start the compose file again Docker would give you the same error. I don't think testcontainers should behave differently, I think if it did, i.e connect to an existing container else start one, it would lead to unexpected results for most people. I'd recommend you remove |
Beta Was this translation helpful? Give feedback.
as mentioned in my initial question, I adopted the solution of suffixing my container names, so in my
docker-compose.yaml
I get for example:Then in my test Jest environnement I do:
And to get the container so I can do
.getMappedPort
I simply use: