-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 742 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 742 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
# build svelte app
FROM node AS node-build
WORKDIR /ChengetaWebApp
# Copy everything
COPY . ./
RUN npm i
RUN npm run build
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /ChengetaWebApp
# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /ChengetaWebApp
COPY --from=node-build /ChengetaWebApp/fullchain.pem .
COPY --from=node-build /ChengetaWebApp/privkey.pem .
COPY --from=build-env /ChengetaWebApp/out .
COPY --from=build-env /ChengetaWebApp/.env .
COPY --from=node-build /ChengetaWebApp/wwwroot ./wwwroot
EXPOSE 5000
ENTRYPOINT ["dotnet", "ChengetaWebApp.dll"]