Docker Container'larında IronOCR Kurulumu

This article was translated from English: Does it need improvement?
Translated
View the article in English

C# ile Görüntüleri veya Pdf Dosyalarını OCR Yapmak mı İstiyorsunuz?

IronOCR, Azure Docker Konteynerleri de dahil olmak üzere, Docker'ı tamamen desteklemektedir ve hem Linux hem de Windows için kullanılabilir.

Docker Linux AWS Windows

Neden Docker kullanmalı?

Docker, geliştiricilerin herhangi bir uygulamayı neredeyse her yerde çalışabilen hafif, taşınabilir, kendi kendine yeterli bir konteyner olarak kolayca paketlemesini, göndermesini ve çalıştırmasını sağlar.

IronOCR ve Linux Rehberi

NET ile Docker sizin için yeniyse, Docker hata ayıklama ve Visual Studio projeleriyle entegrasyon kurma hakkındaki bu mükemmel makaleyi öneririz. https://docs.microsoft.com/en-us/visualstudio/containers/edit-and-refresh?view=vs-2019

Ayrıca bizim IronOCR Linux Kurulumu ve Uyumluluk Rehberi okumanızı şiddetle tavsiye ediyoruz.

Önerilen Linux Docker Dağıtımları

IronPDF'nin "kolay yapılandırılması" için aşağıdaki en son 64 bit Linux işletim sistemlerini öneriyoruz.

  • Ubuntu 20
  • Ubuntu 18 Debian 11
  • Debian 10 [Şu anda Microsoft Azure Varsayılan Linux Dağıtımı]

Microsoft'un Official Docker Images dosyasını kullanmanızı öneririz. Diğer Linux dağıtımları kısmen desteklenir, ancak apt-get kullanılarak manuel yapılandırma gerektirebilir. "Linux Manuel Kurulum" rehberimize bakın.

Ubuntu ve Debian için çalışan Docker dosyaları bu belgeye dahil edilmiştir:

IronOCR Linux Docker Kurulum Temelleri

NuGet Paketimizi Kullanın

IronOCR NuGet Paketini kullanmanızı öneririz. Windows, macOS ve Linux üzerinde geliştirme yaparken çalışır.

Install-Package IronOcr

Ubuntu Linux Docker Dosyaları

Docker Linux Ubuntu

Ubuntu 20 ile .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"]

Ubuntu 20 ile .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"]

Ubuntu 18 ile .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"]

Debian Linux DockerFiles

Docker Linux Debian

Debian 11 ile .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"]

Debian 11 ile .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"]

Debian 10 ile .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"]

Debian 10 ile .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"]

Sıkça Sorulan Sorular

C# OCR uygulamalarını Docker konteynerlerinde nasıl dağıtabilirim?

IronOCR, Docker ile entegre olan bir C# OCR kütüphanesini kullanarak C# OCR uygulamalarını Docker konteynerlerinde dağıtabilirsiniz. apt-utils, libgdiplus, ve libc6-dev gibi gerekli paketlerle birlikte Docker konteynerleri kurmanız ve optimal performans için Microsoft'un resmi Docker imajlarını kullanmalısınız.

Docker'da IronOCR çalıştırmak için en iyi işletim sistemleri nelerdir?

Docker'da IronOCR çalıştırmak için en son 64-bit Linux dağıtımlarını, örneğin Ubuntu 20, Ubuntu 18, Debian 11 ve Debian 10 kullanmanız önerilir, çünkü bunlar kolay yapılandırma ve destek sunar.

IronOCR'yi Azure Docker Konteynerlerinde nasıl yapılandırırım?

IronOCR'yi Azure Docker Konteynerlerinde yapılandırmak için diğer Docker ortamları için kullanılan aynı adımları takip edersiniz. IronOcr NuGet paketini kullanın, önerilen Linux dağıtımlarını kurun ve tüm gerekli bağımlılıkların Dockerfile içinde yer aldığından emin olun.

.NET 5'i Docker'da kullanarak IronOCR kurulum adımları nelerdir?

.NET 5'i Docker'da kullanarak IronOCR kurmak için, IronOcr NuGet paketini yükleyen, apt-utils ve libgdiplus gibi gerekli paketleri ekleyen bir Dockerfile oluşturmanız ve temel imaj için Microsoft'un resmi .NET 5 Docker imajlarını kullanmanız gerekir.

IronOCR Docker ortamlarında Windows üzerinde kullanılabilir mi?

Evet, IronOCR Docker ortamlarında Windows üzerinde kullanılabilir. Bu süreç, IronOcr NuGet paketini kullanmayı ve Windows işletim sistemlerine özgü gerekli bağımlılıkları ve yapılandırmaları içeren Dockerfile'ı yapılandırmayı içerir.

.NET OCR uygulamaları barındırmak için Docker kullanmanın faydaları nelerdir?

.NET OCR uygulamaları barındırmak için Docker kullanmak, kolay dağıtım, daha iyi kaynak yönetimi ve farklı ortamlarda daha büyük taşınabilirlik sağlar. Docker konteynerleri, nereye dağıtılırsa dağıtılsın uygulamaların tutarlı çalışmasını sağlayan kendi kendine yeterlidir.

Docker'da önerilmeyen Linux dağıtımları için manuel yapılandırma gerekli midir?

Evet, önerilenlerin (Ubuntu 20, Ubuntu 18, Debian 11, Debian 10) dışındaki Linux dağıtımlarını kullanıyorsanız, apt-get kullanarak manuel kurulumlar yapmanız gerekebilir. IronOCR tarafından sağlanan 'Linux Manuel Kurulum' rehberinde manuel kurulumla ilgili kılavuz bulunmaktadır.

IronOCR herhangi bir görüntü ön işleme kapasitesi sunuyor mu?

IronOCR, gürültü azaltma, döndürme düzeltme ve kontrast ayarlaması gibi OCR doğruluğunu artırmaya yönelik görüntü ön işleme özelliklerini içerir.

IronOCR bulut uygulamalarında kullanılabilir mi?

Elbette, IronOCR bulut ortamlarına dağıtılabilir, OCR yeteneklerine ihtiyaç duyan web uygulamaları ve hizmetler için uygundur.

IronOCR ile OCR sonuçlarının doğruluğunu nasıl artırırım?

IronOCR ile OCR doğruluğunu artırmak için yüksek kaliteli giriş görüntülerini sağlamaya, uygun dil paketlerini kullanmaya ve kütüphanenin görüntü ön işleme özelliklerinden yararlanmaya özen gösterin.

Curtis Chau
Teknik Yazar

Curtis Chau, Bilgisayar Bilimleri alanında Lisans Derecesine (Carleton Üniversitesi) sahip ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirmeyle ilgileniyor. Sezgisel ve estetik açıdan hoş kullanıcı arayüzleri oluşturma tutkunu, Curtis modern çerçevelerle çalışmayı ve iyi yapı...

Daha Fazla Oku
Başlamaya Hazır mısınız?
Nuget İndirmeler 5,896,332 | Sürüm: 2026.5 just released
Still Scrolling Icon

Hâlâ Kaydırıyor Musunuz?

Hızlıca kanıt ister misiniz? PM > Install-Package IronOcr
örnek çalıştır görüntünüzün aranabilir metin haline gelmesini izleyin.