# Adding IronPDF to an Existing Docker Container
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](/tutorials/what-is-ironpdfengine/).
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/docker--v1.png" alt="Docker Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/fluency/96/000000/azure-1.png" alt="Azure Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/linux--v1.png" alt="Linux Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/amazon-web-services--v1.png" alt="AWS Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/windows-logo--v1.png" alt="Windows Logo" />
</div>
</div>
</div>
### 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](https://docs.microsoft.com/en-us/visualstudio/containers/edit-and-refresh?view=vs-2019).
We also highly recommend you read our [IronPDF Linux Setup and Compatibility Guide](/get-started/linux/).
### Recommended Linux Docker Distributions
We recommend the latest 64-bit Linux OS's below for "easy configuration" of IronPDF.
- Ubuntu 24 (Noble)
- Ubuntu 22
- Ubuntu 20
- Ubuntu 18
- Debian 11
- Debian 10
- CentOS 8
- Amazon AWS Linux 2 [Read the IronPDF AWS Lambda Setup Guide](/get-started/aws/)
We recommend using Microsoft's [Official Docker Images for .NET](https://hub.docker.com/_/microsoft-dotnet-runtime/). Other Linux distros are supported in part, but may require manual configuration. See our "[Linux Manual Setup](/get-started/linux/#other-linux-distros)" guide.
## IronPDF Linux Docker Installation
### Use Linux Optimised NuGet Packages
We recommend using the [IronPdf.Linux](https://www.nuget.org/packages/IronPdf.Linux) NuGet package instead of the regular [IronPDF](https://www.nuget.org/packages/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.
```shell
:InstallCmd Install-Package IronPdf.Linux
```
Another solution is to simply add [IronPdf.Native.Chrome.Linux](https://www.nuget.org/packages/IronPdf.Native.Chrome.Linux/) on top of the regular [IronPDF](https://www.nuget.org/packages/IronPdf/) NuGet package.
```shell
:InstallCmd 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.
```csharp
// 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:
```csharp
// Disable GPU acceleration for Docker environments
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
```
## Ubuntu Linux Docker Files
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/docker--v1.png" alt="Docker Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/ubuntu--v1.png" alt="Ubuntu Logo" />
</div>
</div>
</div>
### 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`).
```dockerfile
# 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"]
```
### 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.
```dockerfile
# 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"]
```
### Ubuntu 22 with .NET 8
<script src="https://gist.github.com/ironsoftwarebuild/1cbe88b49bbdd19b9f8bdc86ac30d60b.js"></script>
### Ubuntu 22 with .NET 7 (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/127c0bc837a8071c26a9eec097038e75.js"></script>
### Ubuntu 20 with .NET 6
<script src="https://gist.github.com/ironsoftwarebuild/6a8c33018a9b89b633a2265ba8ba8338.js"></script>
### Ubuntu 20 with .NET 5 (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/738d00bf96affbb76e138119ce752692.js"></script>
### Ubuntu 20 with .NET 3.1 LTS (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/2ab49b65d05065b05bd3fe1d2f98ee5d.js"></script>
### Ubuntu 18 with .NET 3.1 LTS (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/3d1801eb1b07131c73373e4821202857.js"></script>
## Debian Linux Docker Files
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/docker--v1.png" alt="Docker Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/debian--v1.png" alt="Debian Logo" />
</div>
</div>
</div>
### Debian 12 with .NET 8
<script src="https://gist.github.com/ironsoftwarebuild/baf8d0711ebf821f03ef3ca03f2f3607.js"></script>
### Debian 11 with .NET 7 (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/19b43e2e6e0c92c6dcfd1bd1fc714056.js"></script>
### Debian 11 with .NET 6
<script src="https://gist.github.com/ironsoftwarebuild/937467476f566a382aca8bac3008f386.js"></script>
### Debian 11 with .NET 5 (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/9446684ae9e9e518445136c833d497f6.js"></script>
### Debian 11 with .NET 3.1 LTS (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/928844ce6cf45bf900ea7fc02e725b20.js"></script>
### Debian 10 with .NET 5 (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/e643045ff7ea7201eae997d0ac090c99.js"></script>
### Debian 10 with .NET 3.1 LTS (Legacy)
<script src="https://gist.github.com/ironsoftwarebuild/22b5d0d09b0548a1be7e8a2dd237e78b.js"></script>
## 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:
```shell
# 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
```
#### 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
<div class="container-fluid">
<div class="row">
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/docker--v1.png" alt="Docker Logo" />
</div>
<div class="col-md-2">
<img src="https://img.icons8.com/color/96/000000/windows-logo--v1.png" alt="Windows Logo" />
</div>
</div>
</div>
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](https://docs.microsoft.com/en-us/visualstudio/containers/overview?view=vs-2019)' is a really great get-started guide.
This is an example Windows container Dockerfile for .NET Core 3.1
<script src="https://gist.github.com/ironsoftwarebuild/f485b4bf812815180854fc7f3c24f02c.js"></script>
### Windows Server 2019 .NET 6.0
Pre-configured Windows containers include all the necessary dependencies for running IronPDF.
[[i:(Note that these containers are not intended for BUILDING .NET applications, but rather for RUNNING them.)]]
<script src="https://gist.github.com/ironsoftwarebuild/beedfe65ffb7c633ceee2225ab4c20e5.js"></script>
Visit the [Docker repository](https://hub.docker.com/repositories/ironsoftwareofficial) to explore additional pre-configured images for running IronPDF.
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.
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.
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 dependenciesIronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = false;
// Disable automatic configuration of Linux and Docker dependencies
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = false;
ImportsIronPdf' Disable automatic configuration of Linux and Docker dependenciesIronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = False
Imports IronPdf
' 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 environmentsIronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
// Disable GPU acceleration for Docker environments
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled;
' Disable GPU acceleration for Docker environmentsIronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled
' Disable GPU acceleration for Docker environments
IronPdf.Installation.ChromeGpuMode = IronPdf.Engines.Chrome.ChromeGpuModes.Disabled
Ubuntu Linux Docker Files
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).
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 Imagedocker pull ironsoftwareofficial/ironpdfengine
# Pull the IronPDF Engine Docker Image
docker pull ironsoftwareofficial/ironpdfengine
SHELL
# Run the IronPDF Engine Docker containerdocker run -d -p 33350:33350 ironsoftwareofficial/ironpdfengine
# 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
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.
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 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.