IRONSOFTWAREHOME

Setting up IronBarcode in Docker Containers

Curtis Chau
Curtis Chau
Updated: August 2, 2026

IronBarcode fully supports Docker, including containers in Azure and AWS 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.

IronBarcode 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.

For working with IronBarcode in Linux, we also highly recommend you read our IronBarcode Linux setup and compatibility guide.

We recommend using the following 64-bit Linux distributions for the least hassle in configuring IronBarcode, matching the distros Microsoft currently ships official .NET 8 container images for:

  • Ubuntu 24.04 (Noble)
  • Ubuntu 22.04 (Jammy)
  • Debian 12 (Bookworm)
  • 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 and dependency installations. See our Linux manual setup guide for more information on how to set up with Linux.

IronBarcode Linux Docker Installation Essentials

Use Our NuGet Package

We recommend using the IronBarcode NuGet Package - it works seamlessly when developing on Windows, macOS, and Linux.

PM > Install-Package BarCode

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

# Install necessary packages
RUN apt update

# 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

# Final image to run the 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

# Install necessary packages
RUN apt update

# 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

# Final image to run the 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

# Install necessary packages
RUN apt update

# 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

# Final image to run the 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 is 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

# Final image to run the app
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Example.dll"]
Text

Frequently Asked Questions

What platforms does IronBarcode support for Docker containers?

IronBarcode supports Docker containers on both Linux and Windows platforms, making it versatile for various environments such as Azure and AWS.

Why should I use Docker with IronBarcode?

Docker allows you to package and run IronBarcode applications as lightweight, portable containers. This facilitates easy deployment and scalability across different environments.

Which Linux distributions are recommended for running IronBarcode in Docker?

The recommended Linux distributions for running IronBarcode in Docker are Ubuntu 24.04 (Noble), Ubuntu 22.04 (Jammy), Debian 12 (Bookworm), and RHEL/UBI 8 or 9. These distributions align with Microsoft's official .NET container images.

How can I install IronBarcode in Docker on Ubuntu Linux?

You can install IronBarcode in Docker on Ubuntu Linux by using our NuGet package, which integrates seamlessly across different operating systems like Windows, macOS, and Linux.

What is the suggested way to integrate IronBarcode in a .NET 8 container?

To integrate IronBarcode in a .NET 8 container, it is suggested to use Microsoft's official Docker images for .NET runtimes and SDKs, as described in our specific Dockerfile examples for Ubuntu and Debian distributions.

Can I run IronBarcode on Debian Linux Docker containers?

Yes, you can run IronBarcode on Debian Linux Docker containers. We provide detailed Dockerfile examples for setting it up on Debian 12 (Bookworm) with .NET 8 LTS.

Is it possible to deploy IronBarcode in a RHEL environment using Docker?

Yes, it is possible to deploy IronBarcode in a RHEL environment using Docker. For RHEL-family deployments, it is recommended to use Red Hat's Universal Base Image (UBI) .NET containers.

What should I use for developing IronBarcode applications when using Docker on Linux?

When developing IronBarcode applications using Docker on Linux, it is recommended to utilize our NuGet package for consistent and efficient development across platforms.

Does IronBarcode support both Azure and AWS deployments?

Yes, IronBarcode supports deployments in both Azure and AWS environments, leveraging Docker containers for scalable and reliable deployment solutions.

Is there a guide for manually setting up IronBarcode on Linux?

Yes, there is a Linux manual setup guide available on our website, which provides detailed instructions for setting up IronBarcode manually on Linux distributions that may not fully support official Docker images.

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

Version: 2026.9

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