generated from fahricansecer/boilerplate-be
This commit is contained in:
28
media-worker/Dockerfile
Normal file
28
media-worker/Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
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 kurulumu (ARM64 native Alpine paketi)
|
||||
RUN apk add --no-cache ffmpeg font-dejavu
|
||||
|
||||
# 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"]
|
||||
Reference in New Issue
Block a user