Install ICU in Docker image to support SQL Server memory #1009
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context (Why the change? What's the scenario?)
SQL Server memory cannot be configured when using the Docker image because it depends on ICU which is not installed in the
dotnet/aspnet:alpine
image. This results in aSystem.NotSupportedException
being thrown at runtime whenSqlConnection
attempts to open a connection.High level description (Approach, Design)
Update the
Dockerfile
to installicu-libs
and set theDOTNET_SYSTEM_GLOBALIZATION_INVARIANT
environment variable as outlined in the Enabling (or disabling) globalization functionality document.This problem is discussed extensively in dotnet/SqlClient#220.
Building the Docker image was also failing in Docker Desktop on Windows because of the separator used in the
chown
command. This has been changed from.
to:
which should provide greater compatibility.https://www.gnu.org/software/coreutils/manual/html_node/chown-invocation.html#chown-invocation