-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (26 loc) · 837 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
30
FROM node:16.14-alpine AS node
WORKDIR /src
COPY job-stream-client/package.json .
RUN npm install --force
COPY job-stream-client .
RUN npm run ng build -- --configuration="staging"
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["JobStream/JobStream.csproj", "JobStream/"]
RUN dotnet restore "JobStream/JobStream.csproj"
COPY . .
COPY --from=node /src/dist/job-stream-client /src/wwwroot
WORKDIR "/src/JobStream"
RUN dotnet build "JobStream.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "JobStream.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
EXPOSE 5000
ENV ASPNETCORE_URLS=http://+:5000
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "JobStream.dll"]