1. Help Center
  2. Testcontainers Cloud for Desktop

How to configure Testcontainers Cloud on a per-project basis?

If you want to exclude specific projects from using Testcontainers Cloud, you can configure

When started Testcontainers Cloud configures the local environment to use it for Testcontainers tests by default. Sometimes you might want to opt out from using it in a specific project, for example becuase it uses older Testcontainers libraries not yet compatible with Testcontainers Cloud or code patterns that are not ideal for a cloud based container execution. 

You can configure a particular project not use the global Testcontainers Cloud configuration by updating the dockerconfig.source property in the testcontainers.properties configuration file within the project. 

This option is avaiable for some Testcontainers libraries, for exampe Testcontainers-java  since version 1.16.1. 

Add the testcontainers.properties configuration file to the classpath of your project with the following content:

dockerconfig.source=autoIgnoringUserProperties

You can keep the Testcontainers Cloud client app running and no further changes are necessary, but this project will now use the usual automatic Testcontainers environment discovery mechanism to find a suitable way to communicate with Docker.