-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
29 lines (27 loc) · 940 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
29
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine 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 ["Flutter", "Flutter/"]
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/aspnet:7.0-alpine 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"]