-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
43 lines (32 loc) · 2.16 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
# libgdiplus is required for qr code library
RUN apt-get update && apt-get install -y libgdiplus
WORKDIR /app
EXPOSE 8084
EXPOSE 8085
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Development
WORKDIR /src
COPY ["Directory.Build.props", "/"]
COPY ["Directory.Packages.props", "/"]
COPY ["StyleCop.ruleset", "/"]
COPY ["back-office-service/src/LensUp.BackOfficeService.Contracts/LensUp.BackOfficeService.Contracts.csproj", "LensUp.BackOfficeService.Contracts/"]
COPY ["back-office-service/src/LensUp.BackOfficeService.API/LensUp.BackOfficeService.API.csproj", "LensUp.BackOfficeService.API/"]
COPY ["back-office-service/src/LensUp.BackOfficeService.Application/LensUp.BackOfficeService.Application.csproj", "LensUp.BackOfficeService.Application/"]
COPY ["back-office-service/src/LensUp.BackOfficeService.Domain/LensUp.BackOfficeService.Domain.csproj", "LensUp.BackOfficeService.Domain/"]
COPY ["back-office-service/src/LensUp.BackOfficeService.Infrastructure/LensUp.BackOfficeService.Infrastructure.csproj", "LensUp.BackOfficeService.Infrastructure/"]
COPY ["common/src/LensUp.Common.AzureBlobStorage/LensUp.Common.AzureBlobStorage.csproj", "/common/src/LensUp.Common.AzureBlobStorage/"]
COPY ["common/src/LensUp.Common.AzureTableStorage/LensUp.Common.AzureTableStorage.csproj", "/common/src/LensUp.Common.AzureTableStorage/"]
COPY ["common/src/LensUp.Common.AzureQueueStorage/LensUp.Common.AzureQueueStorage.csproj", "/common/src/LensUp.Common.AzureQueueStorage/"]
COPY ["common/src/LensUp.Common.Types/LensUp.Common.Types.csproj", "/common/src/LensUp.Common.Types/"]
RUN dotnet restore "LensUp.BackOfficeService.API/LensUp.BackOfficeService.API.csproj"
COPY . .
WORKDIR "/src/back-office-service/src/LensUp.BackOfficeService.API"
RUN dotnet build "LensUp.BackOfficeService.API.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build as publish
ARG BUILD_CONFIGURATION=Development
RUN dotnet publish "LensUp.BackOfficeService.API.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "LensUp.BackOfficeService.API.dll"]