Travis Wright
Aug 22, 2017 · 1 min read

Dmitriy — Thanks for sharing this awesome post. It will undoubtedly give people some great ideas on how they can do some more custom/advanced things with the mssql-server-linux container image. For this particular scenario of setting the collation at the time the container starts, we have been tracking this requirement for awhile now. We finally implemented this as an environment variable that you can set in the RC2 release of SQL Server 2017. You can now simply pass -e MSSQL_COLLATION=<your collation> at docker run time. This should simplify some parts of your solution above and you can still use the validation piece to make sure the collation is being set as you expect. Please keep the feedback coming!

Reference:

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables

)
    Travis Wright

    Written by

    Program Manager | SQL Server @ Microsoft | Husband | Father of 3