I’m getting errors returned on this piece of code that worked fine with .NET 6.0:
RUN apk --no-cache add msttcorefonts-installer fontconfig &&
update-ms-fonts &&
fc-cache -f
After upgrading to .NET 8.0, I kept getting the error below. Any help would be appreciated.
OpenSSL: error:0A000126:SSL routines::unexpected eof while reading. Unable to establish SSL connection. Connecting to ufpr.dl.sourceforge.net (ufpr.dl.sourceforge.net)|2801:82:80ff:13:ba59:9fff:fe86:2dd0|:443… failed: Network unreachable…
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
RUN apk add --no-cache tzdata
ENV TZ=America/Chicago
RUN apk --no-cache add msttcorefonts-installer fontconfig &&
update-ms-fonts &&
fc-cache -f -v
ENV ASPNETCORE_HTTP_PORTS=80
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
ENV LC_CTYPE="en_US.UTF-8"
ENV LC_ALL="en_US.UTF-8"
ENV LANG="en_US.UTF-8"
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
FROM build AS publish
RUN dotnet publish "project.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["./project", "--urls", "http://0.0.0.0:80"]
2