-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathDockerfile
53 lines (48 loc) · 1.32 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
RUN mkdir "/opt/thdwebserver"
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["THDWebServer/THDWebServer.csproj", "THDWebServer/"]
RUN dotnet restore "THDWebServer/THDWebServer.csproj"
COPY . .
WORKDIR "/src/THDWebServer"
RUN dotnet build "THDWebServer.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "THDWebServer.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "THDWebServer.dll"]
#FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
#WORKDIR /app/ThunderED
#
#COPY ThunderED/*.csproj ./
#RUN dotnet restore
#
#COPY ThunderED/. ./
#COPY Version.cs /app
#COPY version.txt /app
#COPY LICENSE /app
#RUN dotnet publish -c Release -r debian-x64 -o out
#
#FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-res
#WORKDIR /app/Restarter
#
#COPY Restarter/*.csproj ./
#RUN dotnet restore
#
#COPY Restarter/. ./
#COPY Version.cs /app
#COPY version.txt /app
#COPY LICENSE /app
#RUN dotnet publish -c Release -r debian-x64 -o out
#
#
#FROM mcr.microsoft.com/dotnet/core/runtime:3.1 AS runtime
#WORKDIR /app/ThunderED
#COPY --from=build-env /app/ThunderED/out .
#COPY --from=build-res /app/Restarter/out .
#ENTRYPOINT ["dotnet", "ThunderED.dll"]