Description

PostGIS extends the capabilities of the PostgreSQL relational database by adding support for storing, indexing, and querying geospatial data.

Examples

Dependency:
<dependency>
    <groupId>org.testcontainers</groupId>
    <artifactId>postgresql</artifactId>
    <version>1.20.0</version>
    <scope>test</scope>
</dependency>
Usage:
var image = DockerImageName.parse("postgis/postgis:12-3.0")
    .asCompatibleSubstituteFor("postgres");
var postgis = new PostgreSQLContainer<>(image);
postgis.start();
Dependency:
go get github.com/testcontainers/testcontainers-go/modules/postgres
Usage:
postgisContainer, err := postgres.Run(ctx,
  "postgis/postgis:12-3.0",
  postgres.WithDatabase("test"),
  postgres.WithUsername("user"),
  postgres.WithPassword("password"),
)
Dependency:
dotnet add package Testcontainers.PostgreSql --version 3.9.0
Usage:
var postgisContainer = new PostgreSqlBuilder()
  .WithImage("postgis/postgis:12-3.0")
  .Build();
await postgisContainer.StartAsync();
Dependency:
npm install @testcontainers/postgresql --save-dev
Usage:
const container = await new PostgreSqlContainer(image = "postgis/postgis:12-3.0").start();