IRONSOFTWAREHOME

Setting up IronXL in Docker Containers

Curtis Chau
Curtis Chau
Updated: August 2, 2026

Want to Read, edit & create Excel spreadsheet files Using C#?

IronXL now fully supports Docker, including Azure Docker Containers for Linux and Windows.

DockerAzureLinuxAmazonWindows

Why use Docker?

Docker enables developers to easily pack, ship, and run any application as a lightweight, portable, self-sufficient container, which can run virtually anywhere.

IronXL 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 IronXL Linux Setup and Compatibility Guide

We recommend the latest 64-bit Linux OS's below for "easy configuration" of IronXL, matching the distros Microsoft currently ships official .NET 8 container images for:

  • Ubuntu 24.04 (Noble)
  • Ubuntu 22.04 (Jammy)
  • Debian 12 (Bookworm) [Current Microsoft Azure default Linux distro]
  • RHEL / UBI 8 or 9 (for RHEL-family deployments - see below; Microsoft no longer publishes official CentOS runtime images)

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

Working Docker files for Ubuntu, Debian, and RHEL/UBI are included in this document:

IronXL Linux Docker Installation Essentials

Use Our NuGet Package

We recommend using the IronXL NuGet Package. It works when developing on Windows, macOS, and Linux.

PM > Install-Package IronXL.Excel

Ubuntu Linux DockerFiles

DockerUbuntu

Ubuntu 24.04 (Noble) with .NET 8 LTS

# Base runtime image (Ubuntu 24.04 with .NET runtime)
FROM mcr.microsoft.com/dotnet/runtime:8.0-noble AS base
WORKDIR /app

# Base development image (Ubuntu 24.04 with .NET SDK)
FROM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build
WORKDIR /src

# Restore NuGet packages
COPY ["Example/Example.csproj", "Example/"]
RUN dotnet restore "Example/Example.csproj"

# Build project
COPY . .
WORKDIR "/src/Example"
RUN dotnet build "Example.csproj" -c Release -o /app/build

# Publish project
FROM build AS publish
RUN dotnet publish "Example.csproj" -c Release -o /app/publish

# Run app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Example.dll"]
Text

Ubuntu 22.04 (Jammy) with .NET 8 LTS

# Base runtime image (Ubuntu 22.04 with .NET runtime)
FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy AS base
WORKDIR /app

# Base development image (Ubuntu 22.04 with .NET SDK)
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build
WORKDIR /src

# Restore NuGet packages
COPY ["Example/Example.csproj", "Example/"]
RUN dotnet restore "Example/Example.csproj"

# Build project
COPY . .
WORKDIR "/src/Example"
RUN dotnet build "Example.csproj" -c Release -o /app/build

# Publish project
FROM build AS publish
RUN dotnet publish "Example.csproj" -c Release -o /app/publish

# Run app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Example.dll"]
Text

Debian Linux DockerFiles

Debian 12 (Bookworm) with .NET 8 LTS

# Base runtime image (Debian 12 with .NET runtime)
FROM mcr.microsoft.com/dotnet/runtime:8.0-bookworm-slim AS base
WORKDIR /app

# Base development image (Debian 12 with .NET SDK)
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
WORKDIR /src

# Restore NuGet packages
COPY ["Example/Example.csproj", "Example/"]
RUN dotnet restore "Example/Example.csproj"

# Build project
COPY . .
WORKDIR "/src/Example"
RUN dotnet build "Example.csproj" -c Release -o /app/build

# Publish project
FROM build AS publish
RUN dotnet publish "Example.csproj" -c Release -o /app/publish

# Run app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Example.dll"]
Text

RHEL / UBI DockerFiles

Microsoft no longer publishes official CentOS runtime images (CentOS 7 and 8 are both end-of-life). For RHEL-family deployments, use Red Hat's own Universal Base Image (UBI) .NET containers instead - they're freely usable without a Red Hat subscription and are kept current with supported .NET releases.

RHEL UBI 8 with .NET 8 LTS

# Base runtime image (UBI 8 with .NET 8 runtime)
FROM registry.access.redhat.com/ubi8/dotnet-80-runtime:8.0 AS base
WORKDIR /app

# Base development image (UBI 8 with .NET 8 SDK)
FROM registry.access.redhat.com/ubi8/dotnet-80:8.0 AS build
WORKDIR /src

# Restore NuGet packages
COPY ["Example/Example.csproj", "Example/"]
RUN dotnet restore "Example/Example.csproj"

# Build project
COPY . .
WORKDIR "/src/Example"
RUN dotnet build "Example.csproj" -c Release -o /app/build

# Publish project
FROM build AS publish
RUN dotnet publish "Example.csproj" -c Release -o /app/publish

# Run app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Example.dll"]
Text

Frequently Asked Questions

What is IronXL and how does it relate to Docker?

IronXL is a library that allows developers to read, edit, and create Excel spreadsheet files using C#. It now fully supports Docker, enabling its use within containerized environments, including Azure Docker Containers for both Linux and Windows.

Why should I use Docker with IronXL?

Using Docker with IronXL allows you to package, ship, and run your applications in lightweight, portable containers. This means your Excel applications can run consistently in different environments without needing to worry about the underlying host platform.

Does IronXL support Docker on all operating systems?

Yes, IronXL supports Docker on various operating systems, including Linux and Windows. It is compatible with Docker containers running on Azure and supports Linux distributions like Ubuntu, Debian, and RHEL as outlined for .NET 8 container images.

Which Linux distributions are recommended for using IronXL with Docker?

We recommend using 64-bit versions of Linux such as Ubuntu 24.04 (Noble) and 22.04 (Jammy), as well as Debian 12 (Bookworm) and RHEL/UBI 8 or 9, to ensure easy configuration and compatibility with IronXL.

How can I install IronXL for use in a Docker container?

You can install IronXL using its NuGet package, which is compatible with development environments on Windows, macOS, and Linux. Dockerfile examples provided for different distributions can guide you through setting up your environment.

Is IronXL compatible with .NET 8 in Docker containers?

Yes, IronXL can be used with .NET 8 in Docker containers, as demonstrated in our Dockerfile examples for Ubuntu, Debian, and RHEL/UBI, which utilize Microsoft's official .NET runtime and SDK images.

What are the benefits of using Microsoft's official Docker images with IronXL?

Utilizing Microsoft's official Docker images ensures consistency and ease of setup when working with .NET applications in Docker containers, offering stable and updated environments tailored for IronXL.

Can IronXL be used in a Red Hat environment with Docker?

Yes, IronXL can be used in Docker containers running on RHEL (Red Hat Enterprise Linux) using Red Hat's Universal Base Image (UBI) for .NET 8. This allows deployments without needing a Red Hat subscription, ensuring compatibility with current .NET releases.

What should I do if I face issues with other Linux distributions using IronXL in Docker?

If you encounter issues with other Linux distributions, you may need to configure them manually using `apt-get`. Refer to the IronXL Linux Manual Setup guide for detailed steps.

Where can I find more resources for setting up IronXL in Docker with .NET?

You can find additional resources in the IronXL Linux Setup and Compatibility Guide, and by exploring articles about Docker debugging and Visual Studio integration provided as recommendations on the web page.

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 2,237,574Version: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 IronXL.Excel
nuget.org/packages/IronXL.Excel/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronXL"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronXL to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronXL.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.

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 IronPDF
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