-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·33 lines (28 loc) · 913 Bytes
/
Dockerfile
File metadata and controls
executable file
·33 lines (28 loc) · 913 Bytes
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
FROM microsoft/dotnet:2.1-sdk-alpine AS restore
WORKDIR /app
COPY ./*.sln .
COPY ./*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done
RUN dotnet restore
FROM node as client-build
WORKDIR /app
COPY ./MachinaTrader/package.json .
RUN npm install
RUN npm install node-sass@latest
COPY ./MachinaTrader/build ./build
COPY ./MachinaTrader/wwwroot ./wwwroot
COPY ./MachinaTrader/.babelrc.js ./
COPY ./MachinaTrader/.eslintignore ./
COPY ./MachinaTrader/.eslintrc.json ./
RUN npm run build
RUN npm run build-vendors
RUN npm run css-compile
FROM restore as publish
WORKDIR /app/
COPY . .
COPY --from=client-build /app/wwwroot ./wwwroot
RUN dotnet publish MachinaTrader/MachinaTrader.csproj -o /app/out -c Release
FROM microsoft/dotnet:2.1-aspnetcore-runtime-alpine AS runtime
WORKDIR /app
COPY --from=publish /app/out .
ENTRYPOINT ["dotnet", "MachinaTrader.dll"]