-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDockerfile
38 lines (26 loc) · 782 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
31
32
33
34
35
36
37
38
# Api Container
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /build
COPY . .
# install dotnet cake tool
RUN dotnet tool install -g Cake.Tool
ENV PATH="${PATH}:/root/.dotnet/tools"
# build, restore and test
RUN dotnet cake build.cake --task="Api Publish"
###################################################
# Vue container
FROM node:8 AS client
WORKDIR /client
COPY . .
RUN npm install --prefix ./src/Client/
RUN npm run build --prefix ./src/Client/
###################################################
# Runtime Container
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS runtime
WORKDIR /app
COPY --from=build /build/dist /app
COPY --from=client /client/src/Client/dist /app/wwwroot
WORKDIR /app
EXPOSE 5000
RUN dotnet --list-runtimes
ENTRYPOINT ["dotnet", "WebApi.dll"]