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
I have a container with a SQL Server that is quite resource hungry. I want to share the same docker container for my tests and for local development (F5). For local development I intent to use docker compose to start up the container. Using WithReuse doesn't work in this case, even if I manually add a reuse-id to my compose.yaml, because TestContainers always checks if a container with the reuse hash exists. In my case it tries to create a new container which results in a 409 Conflict being returned by docker.
Solution
Ideally I would be able to point to my compose.yaml file and TestContainers would just run docker compose up and wait for the container to be up and running.
But since this feature request is not really making progress, I am wondering if there is any way to achieve a similar result? Would it make sense to add an option to ignore the reuse hash?
Benefit
I some cases one really wants to share an environment between local dev and unit tests. This feature would enable this scenario.
Alternatives
One would theoretically reference the TestContainers assembly also in the production ASP.NET Core application (maybe with a "Is Debug Build" condition) and also call the ContainerBuilder there. But I am really not sure if this is a good idea?
Would you like to help contributing this enhancement?
No
The text was updated successfully, but these errors were encountered:
Problem
I have a container with a SQL Server that is quite resource hungry. I want to share the same docker container for my tests and for local development (F5). For local development I intent to use
docker compose
to start up the container. UsingWithReuse
doesn't work in this case, even if I manually add areuse-id
to mycompose.yaml
, because TestContainers always checks if a container with the reuse hash exists. In my case it tries to create a new container which results in a409 Conflict
being returned by docker.Solution
Ideally I would be able to point to my
compose.yaml
file and TestContainers would just rundocker compose up
and wait for the container to be up and running.But since this feature request is not really making progress, I am wondering if there is any way to achieve a similar result? Would it make sense to add an option to ignore the reuse hash?
Benefit
I some cases one really wants to share an environment between local dev and unit tests. This feature would enable this scenario.
Alternatives
One would theoretically reference the TestContainers assembly also in the production ASP.NET Core application (maybe with a "Is Debug Build" condition) and also call the ContainerBuilder there. But I am really not sure if this is a good idea?
Would you like to help contributing this enhancement?
No
The text was updated successfully, but these errors were encountered: