Skip to content

Instantly share code, notes, and snippets.

@wk-j
Last active August 26, 2022 13:18
Show Gist options
  • Save wk-j/1d1091ce8ee874f9bc26c35920fe7ac3 to your computer and use it in GitHub Desktop.
Save wk-j/1d1091ce8ee874f9bc26c35920fe7ac3 to your computer and use it in GitHub Desktop.
System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode
# Runtime image
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine
# Fixed: Only the invariant culture is supported in globalization-invariant mode
RUN apk add --no-cache icu-libs krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
# Set timezone
RUN apk add --no-cache tzdata
ENV TZ='Asia/Bangkok'
WORKDIR /app
COPY --from=build /out .
CMD dotnet MyWeb.dll
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment