-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (20 loc) · 885 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src
COPY ["FInSearchAPI/Resources/Bloomberg-Exchange-Code-to-MIC-Mapping.csv" "/Resources/Bloomberg-Exchange-Code-to-MIC-Mapping.csv"]
COPY ["FInSearchAPI.csproj", "."]
COPY ["../FinSearchDataAccessLibrary/FinSearchDataAccessLibrary.csproj", "../FinSearchDataAccessLibrary/"]
RUN dotnet restore "FInSearchAPI.csproj"
COPY . .
WORKDIR "/src/"
RUN dotnet build "FInSearchAPI.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "FInSearchAPI.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "FInSearchAPI.dll"]