forked from PSW-2020-ORG1/MedbayTech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.APITest
32 lines (24 loc) · 965 Bytes
/
Dockerfile.APITest
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
FROM node:12.2.0 as builder
WORKDIR /app
COPY WebApplicationFrontend/ .
ENV PATH /app/node_modules/.bin:$PATH
COPY WebApplicationFrontend/package.json .
RUN npm install
RUN npm install -g @angular/[email protected]
RUN ng build --base-href=/ --configuration=test
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /app
COPY MedbayTech.APIGateways/MedbayTech.APIGateways.csproj MedbayTech.APIGateways/
RUN dotnet restore MedbayTech.APIGateways/MedbayTech.APIGateways.csproj
COPY . .
FROM build AS publish
WORKDIR /app
COPY --from=builder app/dist/WebApplicationFrontend/ MedbayTech.APIGateways/wwwroot/dist/
RUN dotnet publish MedbayTech.APIGateways/MedbayTech.APIGateways.csproj -c Release -o out
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS runtime
RUN useradd -ms /bin/bash defaultuser
WORKDIR /app
COPY --from=publish /app/out .
EXPOSE 5000
ENV API_URL $API_URL
CMD ASPNETCORE_URLS=http://*:$PORT dotnet MedbayTech.APIGateways.dll