-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (16 loc) · 883 Bytes
/
Dockerfile
File metadata and controls
21 lines (16 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /app
COPY Hotsapi.Parser/*.csproj ./Hotsapi.Parser/
COPY Hotsapi.Parser.Test/*.csproj ./Hotsapi.Parser.Test/
COPY Heroes.ReplayParser/Heroes.ReplayParser/*.csproj ./Heroes.ReplayParser/Heroes.ReplayParser/
COPY Heroes.ReplayParser/MpqTool/*.csproj ./Heroes.ReplayParser/MpqTool/
RUN cd Hotsapi.Parser && dotnet restore
COPY . .
RUN dotnet publish -c Release -r linux-x64 -o out --self-contained true /p:PublishTrimmed=true Hotsapi.Parser
RUN dotnet test --logger:"console;verbosity=normal" -c Debug Hotsapi.Parser.Test/Hotsapi.Parser.Test.csproj
FROM mcr.microsoft.com/dotnet/core/runtime-deps:2.2-stretch-slim AS runtime
RUN apt-get update && apt-get install -y libunwind-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/Hotsapi.Parser/out ./
EXPOSE 8080
ENTRYPOINT ["./Hotsapi.Parser"]