Skip to content

Commit

Permalink
Change API container image to use jammy-chiseled-extra container imag…
Browse files Browse the repository at this point in the history
…e which includes ICU libraries (#413)

### Summary & Motivation

The Alpine container image used to deploy the API failed when running
Entity Framework queries, with a `CultureNotFoundException` (see this
GitHub Issue: dotnet/SqlClient#2239).

The root cause is that the SqlClient doesn't support invariant
globalization.

The solution requires that the docker container has ICU libraries
installed. Using a Dockerfile, this would be simple, but since we are
using `dotnet publish -t:PublishContainer ...` we change the container
image from `alpine` to `jammy-chiseled-extra`. Not a perfect solution as
this image is bigger, and hence also has a bigger attack surface.

### Checklist

- [x] I have added a Label to the pull-request
- [x] I have added tests, and done manual regression tests
- [x] I have updated the documentation, if necessary
  • Loading branch information
tjementum authored Apr 9, 2024
2 parents 61a636d + 325df45 commit 690617c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/account-management/Api/Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)/../WebApp/lib/api/</OpenApiDocumentsDirectory>
<OpenApiGenerateDocuments>true</OpenApiGenerateDocuments>
<OpenApiGenerateDocumentsOnBuild>true</OpenApiGenerateDocumentsOnBuild>
<ContainerFamily>alpine</ContainerFamily>
<ContainerFamily>jammy-chiseled-extra</ContainerFamily>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 690617c

Please sign in to comment.