Files
ContentGen_BE/media-worker/Dockerfile
T
Harun CAN 5a52370fe2
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled
main
2026-04-12 15:14:49 +02:00

31 lines
728 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
WORKDIR /src
# Restore dependencies
COPY SaasMediaWorker.csproj .
RUN dotnet restore
# Build
COPY . .
RUN dotnet publish -c Release -o /app/publish --no-restore
# Runtime — ARM64 uyumlu Alpine image
FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine AS runtime
WORKDIR /app
# FFmpeg ve Globalization kurulumu (ARM64 native Alpine paketi)
RUN apk add --no-cache ffmpeg font-dejavu icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
# Temp dizin oluştur
RUN mkdir -p /tmp/contgen-render
COPY --from=build /app/publish .
# Non-root user ile çalıştır (güvenlik)
RUN adduser -D -h /app workeruser
USER workeruser
ENTRYPOINT ["dotnet", "SaasMediaWorker.dll"]