Skip to content

Instantly share code, notes, and snippets.

@JordiCorbilla
Last active May 11, 2020 11:06
Show Gist options
  • Save JordiCorbilla/7cf3c8d1ae153aebe178516a95ae33ce to your computer and use it in GitHub Desktop.
Save JordiCorbilla/7cf3c8d1ae153aebe178516a95ae33ce to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY ["WebApi/*.*", "./WebApi/"]
WORKDIR /src
COPY ["VRTradingService/*.*", "./VRTradingService/"]
WORKDIR /src
COPY ["VRTradingInfraestructureServices/*.*", "./VRTradingInfraestructureServices/"]
RUN dotnet restore "./WebApi/vr.trading.api.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "WebApi/vr.trading.api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "WebApi/vr.trading.api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "vr.trading.api.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment