<@U04UQ68083H> how to create testcontainers for Or...
# ory-copilot
e
@chilly-king-10285 how to create testcontainers for Ory components for integration testing in the golang code base
b
A message from kapa.ai
The knowledge sources do not provide a dedicated guide or code example for creating testcontainers (such as using the [testcontainers-go](https://github.com/testcontainers/testcontainers-go) library) specifically for Ory components in a Go codebase. However, Ory does provide a library called [Ory Dockertest](https://github.com/ory/dockertest), which helps you boot up Docker images for your Go tests with minimal work. This library is designed for integration testing and can be used to spin up Ory services (like Kratos, Hydra, Keto, etc.) as Docker containers during your tests. You can find more about it in the Ory open source documentation, but there are no direct code examples in the provided sources for using Dockertest or testcontainers-go with Ory components specifically. You may refer to the [Dockertest godoc](https://godoc.org/github.com/ory/dockertest) for usage patterns and adapt them for Ory services by specifying the appropriate Docker images and configuration as needed for your tests. If you need more concrete examples or step-by-step instructions, the knowledge sources recommend visiting the Dockertest repository or the Ory Community Examples for further guidance, as the official documentation does not currently include detailed integration test container setup for Ory components in Go codebases [Ory is open source](https://www.ory.sh/docs/open-source).