chore(docker): Install SkiaSharp native dependencies for captcha generation
All checks were successful
continuous-integration/drone/push Build is passing

- Add native library dependencies (libfontconfig1, libfreetype6) required by SkiaSharp
- Install dependencies in final stage before application setup
- Clean up apt cache to reduce image size
- Ensure captcha generation functionality works in containerized environment
This commit is contained in:
zpc 2026-03-26 22:51:18 +08:00
parent e3d91cc13b
commit b639d95b13

View File

@ -20,6 +20,13 @@ RUN dotnet publish "src/MiAssessment.Admin/MiAssessment.Admin.csproj" -c Release
# ==================== 最终运行阶段 ====================
FROM 192.168.195.25:19900/library/dotnet/aspnet:10.0-preview AS final
# 安装 SkiaSharp 验证码生成所需的原生依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
libfontconfig1 \
libfreetype6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/publish .
COPY --from=frontend /app/dist ./wwwroot