Docker Container'larında IronOCR Kurulumu
C# ile Görüntüleri veya PDF Dosyalarını OCR Yapmak İster misiniz?
IronOCR, Azure Docker Konteynerleri de dahil olmak üzere, Docker'ı tamamen desteklemektedir ve hem Linux hem de Windows için kullanılabilir.
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, IronOCR Linux Kurulum ve Uyumluluk Kılavuzu muzu okumanızı da şiddetle tavsiye ederiz.
Önerilen Linux Docker Dağıtımları
IronOCR'un "kolay yapılandırılması" için aşağıda listelenmiş en son 64-bit Linux işletim sistemlerini öneririz.
- Ubuntu 20
- Ubuntu 18
- Debian 11
- Debian 10 [Şu anda Microsoft Azure Varsayılan Linux Dağıtımı]
Microsoft'un Resmi Docker Görsellerini kullanmanızı öneririz. Diğer Linux dağıtımları kısmen desteklenir, ancak apt-get kullanarak manuel yapılandırma gerektirebilir. "Linux Manuel Kurulum" kılavuzumuza 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 kullanmayı öneririz. Windows, macOS ve Linux üzerinde geliştirme yaparken çalışır.
Ubuntu Linux Docker Dosyaları
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
Debian 11 ile .NET 5
# Use the base runtime image for Debian 11 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 11 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 11 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 11 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
IronOCR nedir ve Docker ile nasıl çalışır?
IronOCR, şimdi tamamen Docker konteynerlerini destekleyen gelişmiş bir .NET OCR kütüphanesidir. Bu, Linux, Windows ve macOS gibi çeşitli platformlarda Docker kullanarak ölçeklenebilir, taşınabilir ve tutarlı bir ortamda OCR uygulamalarının çalıştırılmasını sağlar.
OCR uygulamalarım için neden Docker kullanmalıyım?
Docker, geliştiricilerin uygulamaları hafif, taşınabilir ve kendine yeterli konteynerler olarak paketlemelerine, göndermelerine ve çalıştırmalarına olanak tanır. Bu, OCR uygulamalarının herhangi bir ortamda tutarlı bir şekilde çalışmasını sağlar ve dağıtım ve geliştirme süreçlerini basitleştirir.
IronOCR'u Linux tabanlı bir Docker konteynerinde kullanabilir miyim?
Evet, IronOCR, Linux tabanlı Docker konteynerlerinde sorunsuz çalışacak şekilde tasarlanmıştır. Dokümantasyon, entegrasyonun kolay olması için Ubuntu ve Debian gibi popüler Linux dağıtımları için Docker dosyaları sağlamaktadır.
IronOCR'u Docker içinde çalıştırmak için hangi Linux dağıtımları önerilir?
IronOCR, Ubuntu 20, Ubuntu 18, Debian 11 ve Debian 10'un 64-bit sürümlerini kullanmayı önerir. Bu dağıtımlar basit bir yapılandırma sunar, ancak diğer dağıtımlar manuel kurulum gerektirebilir.
IronOCR'u bir Docker konteynerine nasıl kurarım?
IronOCR'u bir Docker konteynerine kurmak için NuGet paketini kullanabilirsiniz. Kurulum, belirli ortamınız için Docker dosyaları oluşturarak ve apt-get paket yöneticisini kullanarak bağımlılıkları ayarlamayı içerir.
IronOCR, farklı .NET çalışma zamanı sürümleri ile uyumlu mu?
Evet, IronOCR, .NET 5 ve .NET 3.1 LTS dahil olmak üzere çeşitli .NET çalışma zamanlarını destekler; bu, Ubuntu ve Debian dağıtımları için dokümantasyonda sağlanan Docker dosyalarında gösterilmiştir.
Docker içinde IronOCR'u çalıştırmak için gerekli paketler nelerdir?
Docker ortamında IronOCR'u çalıştırmak için apt-utils, libgdiplus ve libc6-dev gibi temel paketlerin kurulması gerekmektedir. Bu bağımlılıklar, IronOCR'u kullanan .NET uygulamalarının düzgün çalışması için kritik öneme sahiptir.
IronOCR'u Azure Docker Konteynerleri ile kullanabilir miyim?
Evet, IronOCR, Azure Docker Konteynerleri ile tamamen uyumludur ve Azure ekosistemi içinde Linux ve Windows platformlarında .NET OCR uygulamalarını dağıtıp çalıştırmanıza olanak tanır.
IronOCR kullanarak Docker uygulamaları geliştirmek ve hata ayıklamak için en iyi yol nedir?
Docker ile .NET'e yeni başlayanlar için, dokümantasyon, Docker hata ayıklama ve Visual Studio projeleri ile entegrasyon kurulumu konusunda Microsoft kaynaklarını önerir. Bu yaklaşım, daha sorunsuz bir geliştirme deneyimi sağlar.
IronOCR için önerilen resmi Docker görüntüleri var mı?
IronOCR, .NET uygulamalarını çalıştırmak için Microsoft'un Resmi Docker Görüntülerini kullanmayı tavsiye eder. Bu görüntüler, .NET tabanlı uygulamalar için yüksek seviyede uyumluluk ve performans sağlamak üzere tasarlanmıştır.
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ılandırılmış, görsel olarak çekici kılavuzlar oluşturmayı seviyor.