IRONSOFTWAREHOME

Einrichten von IronOCR in Docker-Containern

Curtis Chau
Curtis Chau
Updated: 29. Juni 2026

Wollen Sie Bilder oder PDF-Dateien in C# OCRen?

IronOCR unterstützt jetzt vollständig Docker, einschließlich Azure Docker-Containern für Linux und Windows.

Docker Linux AWS Windows

Warum Docker verwenden?

Docker ermöglicht es Entwicklern, jede Anwendung als leichtgewichtigen, portablen, eigenständigen Container einfach zu verpacken, zu versenden und auszuführen, der praktisch überall laufen kann.

IronOCR und Linux-Grundlagen

Wenn Docker mit .NET neu für Sie ist, empfehlen wir diesen ausgezeichneten Artikel über das Einrichten von Docker-Debugging und die Integration in Visual Studio-Projekte. https://docs.microsoft.com/en-us/visualstudio/containers/edit-and-refresh?view=vs-2019

Wir empfehlen Ihnen auch dringend, unseren IronOCR Linux Einrichtungs- und Kompatibilitätsleitfaden zu lesen.

Empfohlene Linux-Docker-Distributionen

Wir empfehlen die neuesten 64-Bit-Linux-Betriebssysteme unten für eine "einfache Konfiguration" von IronPDF.

  • Ubuntu 20
  • Ubuntu 18
  • Debian 11
  • Debian 10 [Derzeit der Microsoft Azure Standard-Linux-Distro]

Wir empfehlen die Verwendung von Microsofts Offiziellen Docker Images. Andere Linux-Distributionen werden teilweise unterstützt, erfordern jedoch möglicherweise eine manuelle Konfiguration mit apt-get. Siehe unseren "Linux-Manuellen Einrichtungsleitfaden".

Funktionsfähige Docker-Dateien für Ubuntu und Debian sind in diesem Dokument enthalten:

IronOCR-Linux-Docker-Installationsanforderungen

Nutzen Sie unser NuGet-Paket

Wir empfehlen das IronOCR NuGet-Paket zu verwenden. Es funktioniert beim Entwickeln unter Windows, macOS und Linux.

PM > Install-Package IronOcr

Ubuntu Linux DockerFiles

Docker Linux Ubuntu

Ubuntu 20 mit .NET 5

# Use the base runtime image for Ubuntu 20 with .NET runtime
FROM mcr.microsoft.com/dotnet/runtime:5.0-focal AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Ubuntu 20 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS build
WORKDIR /src

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

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

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

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

Ubuntu 20 mit .NET 3.1 LTS

# Use the base runtime image for Ubuntu 20 with .NET runtime
FROM mcr.microsoft.com/dotnet/runtime:3.1-focal AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Ubuntu 20 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:3.1-focal AS build
WORKDIR /src

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

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

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

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

Ubuntu 18 mit .NET 3.1 LTS

# Use the base runtime image for Ubuntu 18 with .NET runtime
FROM mcr.microsoft.com/dotnet/runtime:3.1-bionic AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Ubuntu 18 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:3.1-bionic AS build
WORKDIR /src

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

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

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

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

Debian Linux DockerFiles

Docker Linux Debian

Debian 11 mit .NET 5

# Use the base runtime image for Debian 10 with .NET runtime
FROM mcr.microsoft.com/dotnet/aspnet:5.0-bullseye-slim AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Debian 10 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:5.0-bullseye-slim AS build
WORKDIR /src

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

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

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

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

Debian 11 mit .NET 3.1 LTS

# Use the base runtime image for Debian 10 with .NET runtime
FROM mcr.microsoft.com/dotnet/aspnet:3.1-bullseye-slim AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Debian 10 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:3.1-bullseye-slim AS build
WORKDIR /src

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

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

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

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

Debian 10 mit .NET 5

# Use the base runtime image for Debian 10 with .NET runtime
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Debian 10 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src

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

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

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

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

Debian 10 mit .NET 3.1 LTS

# Use the base runtime image for Debian 10 with .NET runtime
FROM mcr.microsoft.com/dotnet/runtime:3.1 AS base
WORKDIR /app

# Install necessary packages
RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev

# Use the base development image for Debian 10 with .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src

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

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

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

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

Häufig gestellte Fragen

Wie kann ich C# OCR-Anwendungen in Docker-Containern bereitstellen?

Sie können C# OCR-Anwendungen in Docker-Containern bereitstellen, indem Sie IronOCR verwenden, eine C#-OCR-Bibliothek, die mit Docker integriert ist. Sie müssen die Docker-Container mit den notwendigen Paketen wie apt-utils, libgdiplus und libc6-dev einrichten und Microsofts offizielle Docker-Images für optimale Leistung verwenden.

Welche Betriebssysteme eignen sich am besten für die Ausführung von IronOCR in Docker?

Für die Ausführung von IronOCR in Docker wird empfohlen, die neuesten 64-Bit-Linux-Distributionen wie Ubuntu 20, Ubuntu 18, Debian 11 und Debian 10 zu verwenden, da sie eine einfache Konfiguration und Unterstützung bieten.

Wie konfiguriere ich IronOCR auf Azure Docker-Containern?

Um IronOCR auf Azure Docker-Containern zu konfigurieren, befolgen Sie die gleichen Schritte wie für andere Docker-Umgebungen. Verwenden Sie das IronOcr NuGet-Paket, richten Sie die empfohlenen Linux-Distributionen ein und stellen Sie sicher, dass alle notwendigen Abhängigkeiten in Ihrem Dockerfile enthalten sind.

Welche Schritte gibt es, um IronOCR mit .NET 5 in Docker einzurichten?

Um IronOCR mit .NET 5 in Docker einzurichten, müssen Sie ein Dockerfile erstellen, das das IronOcr NuGet-Paket installiert, erforderliche Pakete wie apt-utils und libgdiplus hinzufügt und die offiziellen .NET 5 Docker-Bilder von Microsoft für das Basisimage verwendet.

Kann IronOCR in Docker-Umgebungen auf Windows verwendet werden?

Ja, IronOCR kann in Docker-Umgebungen auf Windows verwendet werden. Der Prozess beinhaltet die Verwendung des IronOcr NuGet-Pakets und die Konfiguration des Dockerfiles, um notwendige Abhängigkeiten und Konfigurationen spezifisch für Windows-Betriebssysteme einzuschließen.

Was sind die Vorteile der Verwendung von Docker zum Hosten von .NET OCR-Anwendungen?

Die Verwendung von Docker zum Hosten von .NET OCR-Anwendungen ermöglicht eine einfache Bereitstellung, eine bessere Ressourcenverwaltung und eine größere Portabilität zwischen verschiedenen Umgebungen. Docker-Container sind eigenständig und sorgen dafür, dass Anwendungen unabhängig davon, wo sie bereitgestellt werden, konsistent ausgeführt werden.

Ist eine manuelle Konfiguration für nicht empfohlene Linux-Distributionen in Docker erforderlich?

Ja, wenn Sie Linux-Distributionen verwenden, die von den empfohlenen (Ubuntu 20, Ubuntu 18, Debian 11, Debian 10) abweichen, müssen Sie möglicherweise manuelle Konfigurationen mit apt-get durchführen. Anleitungen zur manuellen Einrichtung finden Sie im Leitfaden 'Linux Manual Setup', der von IronOCR bereitgestellt wird.

Can I use IronOCR with Azure Docker Containers?

Yes, IronOCR is fully compatible with Azure Docker Containers, allowing you to deploy and run .NET OCR applications on both Linux and Windows platforms within the Azure ecosystem.

What is the best way to develop and debug Docker applications using IronOCR?

For those new to Docker with .NET, the documentation recommends resources from Microsoft on setting up Docker debugging and integration with Visual Studio projects. This approach facilitates a smoother development experience.

Are there any official Docker images recommended for IronOCR?

IronOCR recommends using Microsoft's Official Docker Images for running .NET applications. These images are designed to provide a high level of compatibility and performance for .NET-based applications.

Curtis Chau
Technischer Autor

Curtis Chau hat einen Bachelor-Abschluss in Informatik von der Carleton University und ist spezialisiert auf Frontend-Entwicklung mit Expertise in Node.js, TypeScript, JavaScript und React. Leidenschaftlich widmet er sich der Erstellung intuitiver und ästhetisch ansprechender Benutzerschnittstellen und arbeitet gerne mit modernen Frameworks sowie der Erstellung gut strukturierter, optisch ansprechender Handbücher.

...
Weiterlesen

Bereit anzufangen?

Nuget Downloads 6,236,385Version:2026.9gerade veröffentlicht

Erhalten Sie sofort Ihren kostenlosen 30-Tage-Testschlüssel.
Ihr Testlizenzschlüssel wurde Ihnen per E-Mail gesendet.
C# NuGet-Bibliothek für PDF
Installation mit NuGet

Version: 2026.9

PM > Install-Package IronOcr
nuget.org/packages/IronOcr/
  1. Rechtsklick auf Referenzen, NuGet-Pakete verwalten
  2. Wählen Sie Durchsuchen und suchen Sie nach "IronOCR"
  3. Paket auswählen und installieren
C# PDF DLL
Download DLL

Version: 2026.9

oder laden Sie den Windows Installer hier herunter.

  1. Laden Sie IronOCR herunter und entpacken Sie es in einem Ordner wie ~/Libs in Ihrem Lösungsverzeichnis.
  2. Klicken Sie im Visual Studio Solution Explorer mit der rechten Maustaste auf Referenzen. Wählen Sie Durchsuchen, "IronOCR.dll"

Lizenzen von $999

Key in blue circle

Holen Sie sich sofort Ihren kostenlosen 30-Tage-Testschlüssel.

Your trial license will be sent to your email address

Keine Einschränkungen. 100 % freigeschaltet. Keine Kreditkarte.

bullet_checkedIhr Testlizenzschlüssel wurde Ihnen per E-Mail gesendet.Keine Einschränkungen. 100 % freigeschaltet. Keine Kreditkarte.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Erhalten Sie Ihre unverbindliche Beratung
Füllen Sie das Formular unten aus oder senden Sie eine E-Mail an sales@ironsoftware.com
Ihre Daten werden immer vertraulich behandelt.
Von Millionen von Ingenieur*innen weltweit vertraut
Kundenlogos von Iron Software
Erhalten Sie sofort Ihren kostenlosen 30-Tage-Testschlüssel.
Ihr Testlizenzschlüssel wurde Ihnen per E-Mail gesendet.