25 lines
716 B
Docker
25 lines
716 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
WORKDIR /app
|
|
EXPOSE 5020
|
|
|
|
ENV ASPNETCORE_HTTP_PORTS=5020
|
|
|
|
USER app
|
|
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
ARG configuration=Release
|
|
WORKDIR /src
|
|
COPY ["Migration/bigqueryconnector.csproj", "Migration/"]
|
|
RUN dotnet restore "Migration/bigqueryconnector.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/Migration"
|
|
RUN dotnet build "bigqueryconnector.csproj" -c $configuration -o /app/build
|
|
|
|
FROM build AS publish
|
|
ARG configuration=Release
|
|
RUN dotnet publish "bigqueryconnector.csproj" -c $configuration -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "bigqueryconnector.dll"]
|