-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (25 loc) · 985 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
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base
WORKDIR /src
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /src
COPY . .
RUN dotnet restore frontend.csproj
RUN dotnet build "./frontend.csproj" -c Debug -o /out
FROM build AS publish
RUN dotnet publish frontend.csproj -c Debug -o /out
# Building final image used in running container
FROM base AS final
WORKDIR /src
COPY --from=publish /out .
ENV ASPNETCORE_URLS=http://*:8080
# Installing vsdbg on the container to enable debugging of .NET Core
RUN apt -o Acquire::https::No-Cache=True -o Acquire::http::No-Cache=True update \
&& apt --fix-broken install \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends apt-utils unzip \
&& apt-get install -y procps \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l /vsdbg
ENTRYPOINT ["dotnet", "frontend.dll"]