forked from TimSon777/LiWiMus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_mvc
24 lines (21 loc) · 920 Bytes
/
Dockerfile_mvc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["src/LiWiMus.Web.MVC/LiWiMus.Web.MVC.csproj", "LiWiMus.Web.MVC/"]
COPY ["src/LiWiMus.SharedKernel/LiWiMus.SharedKernel.csproj", "LiWiMus.SharedKernel/"]
COPY ["src/LiWiMus.Core/LiWiMus.Core.csproj", "LiWiMus.Core/"]
COPY ["src/LiWiMus.Infrastructure/LiWiMus.Infrastructure.csproj", "LiWiMus.Infrastructure/"]
COPY ["src/LiWiMus.Web.Shared/LiWiMus.Web.Shared.csproj", "LiWiMus.Web.Shared/"]
RUN dotnet restore "LiWiMus.Web.MVC/LiWiMus.Web.MVC.csproj"
COPY . .
WORKDIR "/src/src/LiWiMus.Web.MVC"
RUN dotnet build "LiWiMus.Web.MVC.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "LiWiMus.Web.MVC.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "LiWiMus.Web.MVC.dll"]