EvoPdf Next · Docker

Run EvoPdf Next in a container

EvoPdf Next runs in the official Microsoft ASP.NET Core images, mcr.microsoft.com/dotnet/aspnet:10.0 (Ubuntu 24.04) and aspnet:8.0 (Debian 12), on x64 and ARM64 and in Windows containers. The demo application you download is ready to publish and run as a container. This page is the short version of the two documentation guides, with the Dockerfile as it appears there.

Full Linux guide · Full Windows guide · Kubernetes guide · Samples and demos on GitHub · AI agent skills

Why a container

What containerizing EvoPdf Next gives you

  • Dependencies baked into the imageOne apt-get line (libnss3, libatk-bridge2.0-0, libcairo2, libpango-1.0-0) and the HTML rendering runtime has everything it needs; the other components have no native dependencies. No per-server setup.
  • Identical output from laptop to productionFonts, libraries and the Chromium-based runtime are frozen in the image, so a page that converts correctly in staging converts the same way everywhere.
  • Scale conversions horizontallyPDF generation is CPU-bound and bursty. Run more containers when the queue grows, fewer when it doesn't. On Kubernetes, Azure Container Apps, Amazon ECS, Google Cloud Run or a plain Docker host.
  • An isolated runtimeThe library runs in the container's own filesystem and process space, with only the port you expose. Restarting or replacing it is one command.
  • ARM64 in three linesPublish with -r linux-arm64, point the two chmod lines at linux-arm64, reference the ARM64 DLL. The base image is multi-architecture and picks the right one.
  • Push once, deploy from a registryAzure Container Registry, Amazon ECR, Google Artifact Registry, Docker Hub or a private registry: the cloud guides cover each one.
Linux · x64

Publish the app, build the image, run the container

Three commands from the AspNetDemo folder of the downloaded package. The publish folder contains the application DLLs and the evopdf_runtimes directory; the Dockerfile sits next to it in the build context.

Dockerfile · Ubuntu 24.04 · ASP.NET Core 10.0
FROM mcr.microsoft.com/dotnet/aspnet:10.0

# Install EvoPdf dependencies
RUN apt-get update && \
    apt-get install -y libnss3 libatk-bridge2.0-0 \
        libcairo2 libpango-1.0-0 && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy the published ASP.NET Core app (DLLs + evopdf_runtimes/)
COPY publish/linux-x64-net10.0/ .

# Execute permissions for the EvoPdf Next native runtimes
RUN chmod +x /app/evopdf_runtimes/linux-x64/native/evopdf_loadhtml
RUN chmod +x /app/evopdf_runtimes/linux-x64/native/evopdf_pdfprocessor

EXPOSE 27101
ENV ASPNETCORE_URLS=http://+:27101
ENTRYPOINT ["dotnet", "EvoPdf_Next_AspNetDemo_Linux_net10.0.dll"]
ConsoleCLI
dotnet publish -c Release -r linux-x64 -o publish/linux-x64-net10.0 EvoPdf_Next_AspNetDemo_Linux_net10.0.csproj
docker build -t evopdf-next-demo-image-linux .
docker run -d -p 27101:27101 --name evopdf-next-demo-app-linux evopdf-next-demo-image-linux

Open http://localhost:27101 and you have the complete demo application (every HTML to PDF sample, Word, Excel, PDF creation and text extraction) running inside the container.

Other base images

The same Dockerfile works with aspnet:8.0 (Debian 12, .NET 8) and aspnet:8.0-jammy (Ubuntu 22.04), publishing the _net8.0 project; only the FROM line and the names change. Any distribution with the ASP.NET Core runtime preinstalled and the four packages available will do.

Linux ARM64

Publish with -r linux-arm64 from EvoPdf_Next_AspNetDemo_Linux.Arm64_net10.0.csproj, point the two chmod lines at evopdf_runtimes/linux-arm64/native/ and reference EvoPdf_Next_AspNetDemo_Linux.Arm64_net10.0.dll in the entrypoint. The base image is multi-architecture and selects the matching build on the host.

Containers in the cloud

The same image in Azure, AWS and Google Cloud

The Linux image built with this Dockerfile runs unchanged in the container services of the three clouds and in any Kubernetes cluster. The cloud pages cover the registry, the deploy commands and the sizing for each service.

Windows containers

Same idea on Windows Server

The Windows demo application publishes the same way and runs in Windows containers based on the Microsoft ASP.NET Core images for Windows Server. No apt packages, no chmod: the runtime needs nothing beyond the published folder. The Windows guide has the complete Dockerfile and commands.

Registries and cloud

Push once, run anywhere

Push the image to Azure Container Registry, Amazon ECR, Google Artifact Registry, Docker Hub or a private registry and run it from Azure Container Apps, Amazon ECS, Google Cloud Run or any Kubernetes cluster, with the Kubernetes guide. For Azure without containers, see the App Service and Azure Functions guides.

Try it in a container in ten minutes

Download the demo application, publish the Linux project, build with the Dockerfile above. The demo runs without a license key, with a stamp on the output.