diff --git a/Dockerfile b/Dockerfile index 7acdca585..dabfd03b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,9 +36,11 @@ WORKDIR /app RUN \ # Create user #Debian: useradd --create-home --user-group $USER --shell /bin/bash && \ - adduser -D -h /app -s /bin/sh $USER && \ + adduser --disabled-password --home /app --shell /bin/sh $USER && \ # Allow user to access the build - chown -R $USER.$USER /app + chown -R $USER:$USER /app && \ + # Install icu-libs for Microsoft.Data.SqlClient + apk add --no-cache icu-libs COPY --from=build --chown=km:km --chmod=0550 /app/publish . @@ -51,6 +53,9 @@ LABEL org.opencontainers.image.authors="Devis Lucato, https://github.com/dluc" # Define current user USER $USER +# Disable globalization invariant mode for Microsoft.Data.SqlClient +ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false + # Used by .NET and KM to load appsettings.Production.json ENV ASPNETCORE_ENVIRONMENT=Production ENV ASPNETCORE_URLS=http://+:9001