I am trying to dockrize wisej app (framework 3.5.17).
here is Dockerfile:
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get install -y libfontconfig1
RUN apt-get install -y libgdiplus
#Install ms fonts.
# for dotnet 6
# RUN sed -i’.bak’ ‘s/$/ contrib/’ /etc/apt/sources.list
# RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig
# for dotnet 8
RUN echo “deb http://deb.debian.org/debian bookworm contrib non-free” > /etc/apt/sources.list.d/contrib.list
RUN apt update && apt upgrade
RUN apt install ttf-mscorefonts-installer -y
#This needs to be folder where app is published as Linux-64 Release with .net 8.0
COPY x/ app/
WORKDIR /app
EXPOSE 8080
#EXPOSE 443
ENTRYPOINT [“dotnet”, “wisejapp.dll”]
But I am encountering error that should be resolved with libgdiplus library (verified it is installed), and strange ServerLicense error (despite license not being assigned anywhere else)
An help would be appreciated.
Hi Dino,
You don’t need to install libgdiplus if you’re using aspnet:8.0 as your base image:
Please use this docker file instead:
#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 AS base
#Install standard fonts
RUN echo “deb http://deb.debian.org/debian/ bookworm main contrib” > /etc/apt/sources.list && \
echo “deb-src http://deb.debian.org/debian/ bookworm main contrib” >> /etc/apt/sources.list && \
echo “deb http://security.debian.org/ bookworm-security main contrib” >> /etc/apt/sources.list && \
echo “deb-src http://security.debian.org/ bookworm-security main contrib” >> /etc/apt/sources.list
RUN sed -i’.bak’ ‘s/$/ contrib/’ /etc/apt/sources.list
RUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfig
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENTRYPOINT [“dotnet”, “WisejWebApplication17.dll”]
Best,
Alaa
Just for reference on installed versions:
root@4920570cb1a4:/app# apt-get install libgdiplus
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
libgdiplus is already the newest version (6.1+dfsg-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@4920570cb1a4:/app# apt-get install libfontconfig1
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
libfontconfig1 is already the newest version (2.14.1-4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@4920570cb1a4:/app# apt-get install fontconfig
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
fontconfig is already the newest version (2.14.1-4).
fontconfig set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@4920570cb1a4:/app# apt-get install ttf-mscorefonts-installer
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
ttf-mscorefonts-installer is already the newest version (3.8.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Please login first to submit.