Docker Kapları İçinde IronOCR'un 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 ister misiniz?

IronOCR şimdi Docker'ı, Linux ve Windows için Azure Docker Kapları dahil, tamamen desteklemektedir.

Docker Linux AWS Windows

Neden Docker kullanmalısınız?

Docker, geliştiricilerin herhangi bir uygulamayı hafif, taşınabilir, bağımsız bir konteyner olarak paketlemesini, göndermesini ve çalıştırmasını kolaylaştırır ve bu konteynerler neredeyse her yerde çalışabilir.

IronOCR ve Linux Rehberi

Docker ve .NET'e yabancıysanız, Docker hata ayıklama ve Visual Studio projeleri ile entegrasyon hakkında bu mükemmel makaleyi öneririz. https://docs.microsoft.com/en-us/visualstudio/containers/edit-and-refresh?view=vs-2019

IronOCR Linux Kurulum ve Uyumluluk Kılavuzu'muzu okumanızı önemle tavsiye ediyoruz.

Önerilen Linux Docker Dağıtımları

IronPDF'in 'kolay yapılandırma'sı 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 Distro]

Microsoft'un Resmi Docker Görüntülerini 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.

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

IronOCR Linux Docker Kurulum Esasları

NuGet Paketimizi Kullanın

IronOcr NuGet Paketini kullanmanızı öneririz. Windows, macOS ve Linux'ta geliştirme yaparken çalışır.

Install-Package IronOcr

Ubuntu Linux DockerFiles

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 DockerFile'ları

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 konteynerlerine nasıl dağıtabilirim?

IronOCR kullanarak Docker konteynerlerinde C# OCR uygulamalarını dağıtabilirsiniz; bu, Docker ile entegre olan bir C# OCR kütüphanesidir. Docker konteynerlerini, apt-utils, libgdiplus ve libc6-dev gibi gerekli paketlerle kurmanız ve Microsoft'un resmi Docker imajlarını kullanmanız gerekecek, böylece en iyi performansı elde edebilirsiniz.

IronOCR'yi Docker'da çalıştırmak için hangi işletim sistemleri en iyisidir?

IronOCR'yi Docker'da çalıştırmak için, yapılandırma kolaylığı ve desteği sunan Ubuntu 20, Ubuntu 18, Debian 11 ve Debian 10 gibi en son 64-bit Linux dağıtımlarını kullanmanız önerilir.

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

Azure Docker Konteynerlerinde IronOCR'yi yapılandırmak için diğer Docker ortamlarındaki adımları izlemeniz gerekir. IronOcr NuGet paketini kullanın, önerilen Linux dağıtımlarını kurun ve Dockerfile'da gerekli tüm bağımlılıkların dahil olduğundan emin olun.

.NET 5 kullanarak Docker'da IronOCR'yi kurmak için hangi adımlar gereklidir?

.NET 5 kullanarak Docker'da IronOCR'yi kurmak için IronOcr NuGet paketini yükleyen, apt-utils ve libgdiplus gibi gerekli paketleri ekleyen ve Microsoft'un resmi .NET 5 Docker imajlarını temel imaj olarak kullanan bir Dockerfile oluşturmanı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çerecek şekilde Dockerfile'ı yapılandırmayı içerir.

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

.NET OCR uygulamalarını barındırmak için Docker kullanmak, kolay dağıtım, daha iyi kaynak yönetimi ve farklı ortamlar arasında daha iyi taşınabilirlik sağlar. Docker konteynerleri kendi kendine yeterlidir ve nerede dağıtıldığından bağımsız olarak uygulamaların tutarlı bir şekilde çalışmasını sağlar.

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

Evet, önerilenler dışında bir Linux dağıtımı (Ubuntu 20, Ubuntu 18, Debian 11, Debian 10) kullanıyorsanız apt-get kullanarak manuel yapılandırmalar yapmanız gerekebilir. Manuel kurulum ile ilgili kılavuz IronOCR tarafından sağlanan 'Linux Manuel Kurulum' rehberinde yer almaktadır.

Curtis Chau
Teknik Yazar

Curtis Chau, Bilgisayar Bilimleri alanında lisans derecesine sahiptir (Carleton Üniversitesi) ve Node.js, TypeScript, JavaScript ve React konularında uzmanlaşmış ön uç geliştirme üzerine uzmanlaşmıştır. Kullanıcı dostu ve estetik açıdan hoş arayüzler tasarlamaya tutkuyla bağlı olan Curtis, modern çerç...

Daha Fazlasını Oku
Başlamaya Hazır mısınız?
Nuget İndirmeler 5,585,834 | Sürüm: 2026.4 just released
Still Scrolling Icon

Hala Kaydiriyor musunuz?

Hızlı bir kanit mi istiyorsunuz? PM > Install-Package IronOcr
örnekleri çalıştır resminizin aranabilir metne donuşünü izleyin.