-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-web
40 lines (37 loc) · 1.43 KB
/
Dockerfile-web
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
39
40
FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim as base
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
procps \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://aka.ms/getvsdbgsh \
| bash /dev/stdin -v latest -l /vsdbg
COPY etimo-id-web.sln Directory.Build.props ./
COPY src/Etimo.Id.Abstractions/*.csproj ./src/Etimo.Id.Abstractions/
COPY src/Etimo.Id.Attributes/*.csproj ./src/Etimo.Id.Attributes/
COPY src/Etimo.Id.Client/*.csproj ./src/Etimo.Id.Client/
COPY src/Etimo.Id.Constants/*.csproj ./src/Etimo.Id.Constants/
COPY src/Etimo.Id.Dtos/*.csproj ./src/Etimo.Id.Dtos/
COPY src/Etimo.Id.Entities/*.csproj ./src/Etimo.Id.Entities/
COPY src/Etimo.Id.Entities.Abstractions/*.csproj ./src/Etimo.Id.Entities.Abstractions/
COPY src/Etimo.Id.Exceptions/*.csproj ./src/Etimo.Id.Exceptions/
COPY src/Etimo.Id.Security/*.csproj ./src/Etimo.Id.Security/
COPY src/Etimo.Id.Settings/*.csproj ./src/Etimo.Id.Settings/
COPY src/Etimo.Id.Web/*.csproj ./src/Etimo.Id.Web/
RUN dotnet restore
COPY . .
FROM base as dev
VOLUME /app/src
ENV DOTNET_USE_POLLING_FILE_WATCHER 1
CMD dotnet watch --project ./src/Etimo.Id.Web run --no-restore
FROM base as build
RUN dotnet build \
--configuration Release \
--no-restore \
--output ./out \
etimo-id-web.sln
FROM mcr.microsoft.com/dotnet/aspnet:5.0 as prod
WORKDIR /app
COPY --from=build /app/out .
EXPOSE 443
CMD dotnet Etimo.Id.Web.dll