hrms-api-exam/Dockerfile

23 lines
776 B
Text
Raw Normal View History

2023-03-23 12:31:21 +07:00
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
2023-03-29 20:44:39 +07:00
COPY ["nuget.config", "."]
COPY ["BMA.EHR.Recurit.Exam.Service.csproj", "."]
RUN dotnet restore "./BMA.EHR.Recurit.Exam.Service.csproj"
2023-03-23 12:31:21 +07:00
COPY . .
WORKDIR "/src/."
2023-03-29 20:44:39 +07:00
RUN dotnet build "BMA.EHR.Recurit.Exam.Service.csproj" -c Release -o /app/build
2023-03-23 12:31:21 +07:00
FROM build AS publish
2023-03-29 20:44:39 +07:00
RUN dotnet publish "BMA.EHR.Recurit.Exam.Service.csproj" -c Release -o /app/publish /p:UseAppHost=false
2023-03-23 12:31:21 +07:00
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
2023-03-29 20:44:39 +07:00
ENTRYPOINT ["dotnet", "BMA.EHR.Recurit.Exam.Service.dll"]