'How to install and setup LibreOffice SDK in a Linux container?

I'm developing a containerized .NET 6 application that is based on Linux, by default it is using Debian OS but there are options like Ubuntu and Alpine.

How to properly add and configure LibreOffice SDK in a docker image?

Here's the content of my dockerfile:

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Sample.WebApi/Sample.WebApi.csproj", "Sample.WebApi/"]
RUN dotnet restore "Sample.WebApi/Sample.WebApi.csproj"
COPY . .
WORKDIR "/src/Sample.WebApi"
RUN dotnet build "Sample.WebApi.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Sample.WebApi.csproj" -c Release -o /app/publish

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


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source