add github action and dockerfile

This commit is contained in:
Suphonchai Phoonsawat 2023-04-21 10:45:52 +07:00
parent fe80ebca19
commit 302ee1dd3b
4 changed files with 125 additions and 3 deletions

View file

@ -7,10 +7,12 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj", "BMA.EHR.Report.Service/"]
RUN dotnet restore "BMA.EHR.Report.Service/BMA.EHR.Report.Service.csproj"
COPY Components ./Components
COPY ["nuget.config", "."]
COPY ["BMA.EHR.Report.Service.csproj", "."]
RUN dotnet restore "./BMA.EHR.Report.Service.csproj"
COPY . .
WORKDIR "/src/BMA.EHR.Report.Service"
WORKDIR "/src/."
RUN dotnet build "BMA.EHR.Report.Service.csproj" -c Release -o /app/build
FROM build AS publish