IRONSOFTWAREHOME

Adding IronPDF to an Existing Docker Container

Curtis Chau
Curtis Chau
Updated: July 21, 2026

IronPDF for .NET Standard now fully supports Docker, including Azure Docker Containers for Linux and Windows.

Do you want to deploy IronPDF as a separate Docker container instead? Learn more about the IronPDFEngine tutorials guide.

Docker Logo
Azure Logo
Linux Logo
AWS Logo
Windows Logo

Why use Docker on Azure?

Alongside excellent enterprise scalability, Docker Containers on Azure enjoy more permissions than regular WebApps. This allows rendering of SVG fonts because system access to GDI+ graphics is enabled.

IronPDF and Linux Primer

If Docker with .NET is new to you, we recommend this excellent article on setting up Docker debugging and integration with Visual Studio projects.

We also highly recommend you read our IronPDF Linux Setup and Compatibility Guide.

We recommend the latest 64-bit Linux OS's below for "easy configuration" of IronPDF.

We recommend using Microsoft's Official Docker Images for .NET. Other Linux distros are supported in part, but may require manual configuration. See our "Linux Manual Setup" guide.

IronPDF Linux Docker Installation

Use Linux Optimised NuGet Packages

We recommend using the IronPdf.Linux NuGet package instead of the regular IronPDF package to save disk space and avoid assets being downloaded when you start your Docker instance. Don't worry, it still works when developing on Windows or macOS - it is just Linux optimized.

PM > Install-Package IronPdf.Linux

Another solution is to simply add IronPdf.Native.Chrome.Linux on top of the regular IronPDF NuGet package.

PM > Install-Package IronPdf.Native.Chrome.Linux

Avoid Automatic Dependency Installation

Many users report better results with Linux & Docker when LinuxAndDockerDependenciesAutoConfig is set to false. This is because the prerequisites are already installed by apt-get style package managers in your Docker files.

// Disable automatic configuration of Linux and Docker dependencies
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = false;

Disable GPU Acceleration

Linux Docker containers often do not have access to a GPU. GPU acceleration is disabled by default. If you have enabled GPU acceleration (any mode other than ChromeGpuModes.Disabled, such as ChromeGpuModes.Hardware), we highly recommend you set Installation.ChromeGpuMode = ChromeGpuModes.Disabled for Docker deployments:

// Disable GPU acceleration for Docker environments
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;

Ubuntu Linux Docker Files

Docker Logo
Ubuntu Logo

Ubuntu 24 with .NET 10

Ubuntu 24.04 (Noble) uses 64-bit time_t transition packages, so some library names differ from earlier Ubuntu versions (e.g., libasound2t64 instead of libasound2).

# Build stage
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS build
WORKDIR /app
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /app/publish

# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:10.0-noble AS runtime

# Install IronPDF dependencies for Ubuntu 24.04 Noble (64-bit transition libraries)
RUN apt-get update && apt-get install -y \
    libasound2t64 \
    libatk1.0-0t64 \
    libatk-bridge2.0-0t64 \
    libcairo2 \
    libcups2t64 \
    libdbus-1-3 \
    libdrm2 \
    libexpat1 \
    libfontconfig1 \
    libgbm1 \
    libglib2.0-0t64 \
    libgtk-3-0t64 \
    libnspr4 \
    libnss3 \
    libpango-1.0-0 \
    libpangocairo-1.0-0 \
    libx11-6 \
    libxcb1 \
    libxcomposite1 \
    libxdamage1 \
    libxext6 \
    libxfixes3 \
    libxkbcommon0 \
    libxrandr2 \
    fonts-liberation \
    wget \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "YourApp.dll"]
Text

Ubuntu 24 with .NET 8

.NET 8 LTS paired with Ubuntu 24.04 LTS is a common production combination. The same 64-bit transition library names apply.

# Build stage
FROM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build
WORKDIR /app
COPY *.csproj .
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /app/publish

# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble AS runtime

# Install IronPDF dependencies for Ubuntu 24.04 Noble (64-bit transition libraries)
RUN apt-get update && apt-get install -y \
    libasound2t64 \
    libatk1.0-0t64 \
    libatk-bridge2.0-0t64 \
    libcairo2 \
    libcups2t64 \
    libdbus-1-3 \
    libdrm2 \
    libexpat1 \
    libfontconfig1 \
    libgbm1 \
    libglib2.0-0t64 \
    libgtk-3-0t64 \
    libnspr4 \
    libnss3 \
    libpango-1.0-0 \
    libpangocairo-1.0-0 \
    libx11-6 \
    libxcb1 \
    libxcomposite1 \
    libxdamage1 \
    libxext6 \
    libxfixes3 \
    libxkbcommon0 \
    libxrandr2 \
    fonts-liberation \
    wget \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "YourApp.dll"]
Text

Ubuntu 22 with .NET 8

Ubuntu 22 with .NET 7 (Legacy)

Ubuntu 20 with .NET 6

Ubuntu 20 with .NET 5 (Legacy)

Ubuntu 20 with .NET 3.1 LTS (Legacy)

Ubuntu 18 with .NET 3.1 LTS (Legacy)

Debian Linux Docker Files

Docker Logo
Debian Logo

Debian 12 with .NET 8

Debian 11 with .NET 7 (Legacy)

Debian 11 with .NET 6

Debian 11 with .NET 5 (Legacy)

Debian 11 with .NET 3.1 LTS (Legacy)

Debian 10 with .NET 5 (Legacy)

Debian 10 with .NET 3.1 LTS (Legacy)

Alpine Linux Docker Files

Running IronPDF on Alpine Linux is not supported. We wish we could but we can't. Frankly, we like Alpine and hope this project continues and grows. As of 2023, Alpine still uses outdated "musl" C language libraries that do not allow chromium developers to fully support this OS yet.

Using Alpine Docker with IronPdfEngine in .NET 6

IronPDF provides a container image containing all IronPDF functionalities. This enables projects running on Alpine to access IronPD functionalities by connecting to the IronPdfEngine container.

Step 1: Pull and Run IronPDF Engine Docker Image

Execute the following commands in your terminal to pull and run the IronPDF Engine Docker image:

# Pull the IronPDF Engine Docker Image
docker pull ironsoftwareofficial/ironpdfengine
SHELL
# Run the IronPDF Engine Docker container
docker run -d -p 33350:33350 ironsoftwareofficial/ironpdfengine
SHELL

Step 2: Set Up Console App

Create a new console application targeting .NET 6. Install the IronPdf.Slim NuGet package using the NuGet Package Manager.

Windows Docker File

Docker Logo
Windows Logo

Windows Docker Containers are becoming increasingly popular on Azure, as they offer higher levels of performance and scalability and give developers more permissions to configure instances.

IronPDF will actually perform more attractive text rendering within a Docker container (Windows or Linux) on Azure due to higher levels of access to graphics library and the virtual graphics card.

The article 'Visual Studio Container Tools for Docker' is a really great get-started guide.

This is an example Windows container Dockerfile for .NET Core 3.1

Windows Server 2019 .NET 6.0

Pre-configured Windows containers include all the necessary dependencies for running IronPDF.

Please note: Note that these containers are not intended for BUILDING .NET applications, but rather for RUNNING them.

Visit the Docker repository to explore additional pre-configured images for running IronPDF.

Frequently Asked Questions

How can IronPDF be added to an existing Docker container?

IronPDF for .NET Standard fully supports Docker, including both Azure Docker Containers for Linux and Windows, allowing you to add it to your existing setup.

Why should I consider deploying Docker Containers on Azure?

Docker Containers on Azure offer excellent enterprise scalability and more permissions than regular WebApps, enabling features like rendering SVG fonts through system access to GDI+ graphics.

Which Linux distributions are recommended for using IronPDF in Docker?

For 'easy configuration' with IronPDF, we recommend using Ubuntu 24, Ubuntu 22, Ubuntu 20, Ubuntu 18, Debian 11, Debian 10, CentOS 8, and Amazon AWS Linux 2.

What is the advantage of using the IronPdf.Linux NuGet package?

The IronPdf.Linux NuGet package is optimized for Linux, saving disk space and preventing assets from downloading when starting a Docker instance, while still supporting development on Windows or macOS.

How can I avoid automatic dependency installation for IronPDF in Docker?

Disabling `LinuxAndDockerDependenciesAutoConfig` can help achieve better results because dependencies are often already installed via `apt-get` package managers in Docker files.

Why should GPU acceleration be disabled in Linux Docker containers?

GPU acceleration is often unnecessary in Linux Docker containers that do not have GPU access, and disabling it can lead to more stable performance using `ChromeGpuModes.Disabled`.

Is IronPDF compatible with Alpine Linux?

Running IronPDF on Alpine Linux is not supported due to outdated libraries not allowing full Chromium support, though IronPDF functionalities can be accessed by connecting to an IronPdfEngine container.

What Windows Docker configuration offers enhanced performance for IronPDF?

Windows Docker Containers on Azure can enhance IronPDF performance by allowing more attractive text rendering owing to better graphics library and virtual graphics card access.

What should I use for a Windows Dockerfile to run IronPDF with .NET Core 3.1?

You can follow the example Windows container Dockerfile provided in the IronPDF documentation for .NET Core 3.1, ensuring all dependencies are suitably installed.

Where can I find pre-configured Docker images for running IronPDF?

Pre-configured Docker images for IronPDF are available on the Iron Software official Docker repository, which supports various Windows and Linux configurations.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 21,105,021Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999