thalos-bff/Dockerfile
José René White Enciso be41225087 chore(thalos-bff): add container run assets
Why: align BFF runtime packaging and remove cross-repo proto coupling in container builds.

What: add Docker assets and runbook, map /health, and vendor grpc proto locally.

Rule: keep technical intent only and avoid orchestration references.
2026-03-08 14:34:12 -06:00

23 lines
1.1 KiB
Docker

# syntax=docker/dockerfile:1.7
ARG SDK_IMAGE=mcr.microsoft.com/dotnet/sdk:10.0
ARG RUNTIME_IMAGE=mcr.microsoft.com/dotnet/aspnet:10.0
FROM ${SDK_IMAGE} AS build
ARG NUGET_FEED_URL=http://192.168.10.100:3000/api/packages/AgileWebs/nuget/index.json
ARG NUGET_FEED_USERNAME=
ARG NUGET_FEED_TOKEN=
WORKDIR /src
COPY . .
RUN if [ -n "$NUGET_FEED_USERNAME" ] && [ -n "$NUGET_FEED_TOKEN" ]; then dotnet nuget add source "$NUGET_FEED_URL" --name gitea-org --username "$NUGET_FEED_USERNAME" --password "$NUGET_FEED_TOKEN" --store-password-in-clear-text --allow-insecure-connections --configfile /root/.nuget/NuGet/NuGet.Config; fi
RUN dotnet restore "src/Thalos.Bff.Rest/Thalos.Bff.Rest.csproj" --configfile /root/.nuget/NuGet/NuGet.Config
RUN dotnet publish "src/Thalos.Bff.Rest/Thalos.Bff.Rest.csproj" -c Release -o /app/publish /p:UseAppHost=false --no-restore
FROM ${RUNTIME_IMAGE} AS runtime
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:8080 ASPNETCORE_ENVIRONMENT=Production
EXPOSE 8080
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Thalos.Bff.Rest.dll"]