2020-11-25 12:16:14 +01:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
2020-11-23 09:23:05 +01:00
|
|
|
WORKDIR /app
|
2020-11-23 13:31:09 +01:00
|
|
|
RUN apt-get update && apt-get install -y curl
|
2020-11-25 12:16:14 +01:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
2020-11-23 13:31:09 +01:00
|
|
|
RUN apt-get update && apt-get install -y nodejs
|
2020-11-23 09:23:05 +01:00
|
|
|
|
2020-11-25 12:16:14 +01:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
2020-11-23 13:31:09 +01:00
|
|
|
RUN apt-get update && apt-get install -y curl
|
2020-11-25 12:16:14 +01:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
2020-11-23 13:31:09 +01:00
|
|
|
RUN apt-get update && apt-get install -y nodejs
|
2020-11-23 09:23:05 +01:00
|
|
|
WORKDIR /src
|
|
|
|
COPY ["Birdmap.API/Birdmap.API.csproj", "Birdmap.API/"]
|
|
|
|
COPY ["Birdmap.BLL/Birdmap.BLL.csproj", "Birdmap.BLL/"]
|
|
|
|
COPY ["Birdmap.Common/Birdmap.Common.csproj", "Birdmap.Common/"]
|
|
|
|
COPY ["Birdmap.DAL/Birdmap.DAL.csproj", "Birdmap.DAL/"]
|
|
|
|
RUN dotnet restore "Birdmap.API/Birdmap.API.csproj"
|
|
|
|
COPY . .
|
|
|
|
WORKDIR "/src/Birdmap.API"
|
|
|
|
RUN dotnet build "Birdmap.API.csproj" -c Release -o /app/build
|
|
|
|
|
|
|
|
FROM build AS publish
|
|
|
|
RUN dotnet publish "Birdmap.API.csproj" -c Release -o /app/publish
|
|
|
|
|
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
ENTRYPOINT ["dotnet", "Birdmap.API.dll"]
|