Hi,
I have a few questions.
- Is dotNet8 is supported by that package NuGet Gallery | Aspose.Slides.NET 24.9.0 ?
- or by NuGet Gallery | Aspose.Slides.NET6.CrossPlatform 24.9.0?
Can you provide an example of the correct docker file for dotnet8 for linux container?
because docker file below always fails with error:
- System.Drawing.Common is not supported on this platform.
for lines
-System.Drawing.FontFamily.get_GenericSerif()
- …
-at Aspose.Slides.Paragraph.GetLinesCount()
As you can see, I`ve tried to install dependencies in different ways
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
# USER app
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
# Install dependencies for Aspose Slides
# - 'libgdiplus' for System.Drawing support
# - 'fontconfig' to manage fonts on macOS/Linux
#RUN apt-get update && \
#apt-get install -y libgdiplus fontconfig && \
#rm -rf /var/lib/apt/lists/*
# RUN yum install -y libgdiplus glibc-devel libfontconfig1 libfreetype6 libexpat1 libpng16-16
# Install dependencies for Aspose Slides
# - 'libgdiplus' for System.Drawing support
# - 'fontconfig' to manage fonts on macOS/Linux
# Update dependencies for System.Drawing
RUN apt-get update && apt-get install -y \
libgdiplus \
libfontconfig1 \
libfreetype6 \
libexpat1 \
libpng16-16
# RUN apt-get update
# RUN apt-get install -y libgdiplus libexpat1 libpng16-16
# RUN cd /usr/lib \
# && ln -s libgdiplus.so gdiplus.dll
# RUN apt-get install -y libc6
# RUN apt-get install -y libc6-dev libx11-dev
# RUN apt-get install -y libicu-dev libharfbuzz0b libfontconfig1 libfreetype6
# RUN rm -rf /var/lib/apt/lists/*
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
ARG DOWNLOAD_ASPOSE_LICENSE=false
WORKDIR /src
COPY ["Directory.Build.props", "."]
COPY ["Services/API.csproj", ".API/"]
RUN dotnet restore "./Services/API/API.csproj"
COPY . .
WORKDIR "/src/Services/API"
RUN dotnet build "./API.csproj" -c $BUILD_CONFIGURATION -o /app/build /p:NoWarn=CS1591
FROM build AS publish
RUN dotnet publish "./API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "API.dll"]