-
Notifications
You must be signed in to change notification settings - Fork 45
/
Dockerfile
27 lines (22 loc) · 960 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
#Orgbook service Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 8080
ENV ASPNETCORE_URLS=http://*:8080
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
RUN dotnet tool install --tool-path /tools dotnet-trace
RUN dotnet tool install --tool-path /tools dotnet-counters
RUN dotnet tool install --tool-path /tools dotnet-dump
WORKDIR /src
COPY ["orgbook-service/orgbook-service.csproj", "orgbook-service/"]
COPY ["cllc-interfaces/Dynamics-Autorest/DynamicsAutorest.csproj", "cllc-interfaces/Dynamics-Autorest/"]
RUN dotnet restore "orgbook-service/orgbook-service.csproj"
COPY . .
WORKDIR "/src/orgbook-service"
RUN dotnet build "orgbook-service.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "orgbook-service.csproj" -c Release -o /app/publish --runtime linux-musl-x64 --no-self-contained
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "orgbook-service.dll"]