forked from diegomvh/ODataApiGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (26 loc) · 897 Bytes
/
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
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
WORKDIR /src
COPY ["ODataApiGen.csproj", "."]
RUN dotnet restore "ODataApiGen.csproj"
COPY ["application.json", "."]
COPY ["Program.cs", "."]
COPY ["Renderer.cs", "."]
COPY ["DirectoryManager.cs", "."]
COPY ["NameGenerator.cs", "."]
COPY ["Templates", "Templates/"]
COPY ["Static", "Static/"]
COPY ["Models", "Models/"]
COPY ["Angular", "Angular/"]
COPY ["Extensions", "Extensions/"]
COPY ["Abstracts", "Abstracts/"]
WORKDIR "/src"
RUN dotnet build "ODataApiGen.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "ODataApiGen.csproj" -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/runtime:3.1 as base
FROM base AS final
WORKDIR /app
COPY --from=publish ["/app/publish", "."]
COPY --from=publish ["/src/Templates", "Templates/"]
COPY --from=publish ["/src/Static", "Static/"]
ENTRYPOINT ["dotnet", "ODataApiGen.dll"]