-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 763 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["Server/ChatRoom.Server.csproj", "Server/"]
COPY ["Client/ChatRoom.Client.csproj", "Client/"]
RUN dotnet restore "Server/ChatRoom.Server.csproj"
COPY . .
WORKDIR "/src/Server"
RUN dotnet build "ChatRoom.Server.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "ChatRoom.Server.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ChatRoom.Server.dll"]