i am using dotnet 2.2 image to run my service application at environment: docker windows (linux container)
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build-env
and hitting below error:
System.Globalization.CultureNotFoundException: Culture is not supported.| Parameter name: culture| 1033 (0x0409) is an invalid culture identifier.
i have set following at docker file. build without problem but still error displayed when application is running
# Set the locale
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
this works.
updating the solution: i have run the same docker image at teamcity , linux based environement and the extra lines to define codepage is not needed at all.
so this issue is only happend at docker windows (linux container) run at Windows 10.
# Disable the invariant mode (set in base image)
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8