Using Testcontainers, how can I set the database collation when starting a docker image for a MS SQL Server database?
Asked
Active
Viewed 253 times
1 Answers
0
On the container, you should just add an environment variable.
String dockerImageName = // here the specific imahe + tag
String collation = // a valid collation, e.g. "Latin1_General_CS_AS"
MSSQLServerContainer mssqlServerContainer = new MSSQLServerContainer(dockerImageName);
mssqlServerContainer.addEnv("MSSQL_COLLATION", collation);

JeanValjean
- 17,172
- 23
- 113
- 157