Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container Linux Docker Net 7.0 #702

Open
tiagovbp opened this issue Jun 6, 2024 · 6 comments
Open

Container Linux Docker Net 7.0 #702

tiagovbp opened this issue Jun 6, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@tiagovbp
Copy link

tiagovbp commented Jun 6, 2024

I'm testing Container Linux, and when I go up and try to test my application, it gives the following error with FastReport in the report.Prepare() step;

image
image

"Exception in BuildFontRuns() with original length of 35 now 35, style run count 1, font run count 0, direction overrides: False.

Small part of the dockerfile

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
RUN apt-get update
&& apt-get install -y wget
&& rm -rf /var/lib/apt/lists/*
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula
select true | debconf-set-selections
RUN apt-get update
&& wget http://ftp.fr.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb -P /Downloads
&& apt-get install -y /Downloads/ttf-mscorefonts-installer_3.8_all.deb
&& rm /Downloads/ttf-mscorefonts-installer_3.8_all.deb
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src

Some help?

@tiagovbp tiagovbp added the bug Something isn't working label Jun 6, 2024
@BogdanStegachev
Copy link

Hello!

Here is an example of a correct Dockerfile:

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
RUN apt-get update \
    && apt-get install -y wget \
    && rm -rf /var/lib/apt/lists/*
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula \
    select true | debconf-set-selections
RUN apt-get update \
    && wget http://ftp.fr.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb -P /Downloads \
    && apt-get install -y /Downloads/ttf-mscorefonts-installer_3.8_all.deb \
    && rm /Downloads/ttf-mscorefonts-installer_3.8_all.deb \
    && rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 80
EXPOSE 443



FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["FastReportSkia/FastReportSkia.csproj", "FastReportSkia/"]
RUN dotnet restore "./FastReportSkia/FastReportSkia.csproj"
COPY . .
WORKDIR "/src/FastReportSkia"
RUN dotnet build "./FastReportSkia.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./FastReportSkia.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "FastReportSkia.dll"]

Best regards,
Bogdan

@tiagovbp
Copy link
Author

tiagovbp commented Jun 6, 2024

Hi @BogdanStegachev , unfortunately that's not my problem. =(

@tiagovbp
Copy link
Author

tiagovbp commented Jun 6, 2024

"Exception in BuildFontRuns() with original length of 35 now 35, style run count 1, font run count 0, direction overrides: False."

@BogdanStegachev
Copy link

BogdanStegachev commented Jun 6, 2024

I am sending you a test application using FastReport.Core.Skia Demo version 2024.2.9 and Docker below

Application: https://drive.google.com/file/d/1FOxqLbEIa28Kl9El9EDbYEH90hkgtA_R/view?usp=sharing

Best regards,
Bogdan

@tiagovbp
Copy link
Author

It worked correctly. The only question that is marked as "DEMO".

Do you know of any free solutions? Or just buying the license itself?

Thanks @BogdanStegachev

@BogdanStegachev
Copy link

Hello!

You will also be able to add libgdiplus installation and follow the test Dockerfile above to solve your problem, I send you an example of installing libgdiplus in Dockerfile :

RUN ln -s /lib/x86_64-linux-gnu/libdl-2.24.so /lib/x86_64-linux-gnu/libdl.so
RUN apt-get update \
 && apt-get install -y --allow-unauthenticated \
 libc6-dev \
 libgdiplus \
 libx11-dev
 && rm -rf /var/lib/apt/lists/*
ENV DISPLAY :99

Best regards,
Bogdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants