add nowarn

This commit is contained in:
Suphonchai Phoonsawat 2025-04-24 11:09:59 +07:00
parent 16b0990454
commit 03359dd955
2 changed files with 12 additions and 10 deletions

View file

@ -10,17 +10,19 @@
<DockerfileContext>.</DockerfileContext> <DockerfileContext>.</DockerfileContext>
<RootNamespace>BMA.EHR.Leave.Service</RootNamespace> <RootNamespace>BMA.EHR.Leave.Service</RootNamespace>
<AssemblyName>BMA.EHR.Leave</AssemblyName> <AssemblyName>BMA.EHR.Leave</AssemblyName>
<NoWarn>$(NoWarn);1591</NoWarn>
<NoWarn>$(NoWarn);</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Controllers\CheckInController.cs" /> <Compile Remove="Controllers\CheckInController.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\.dockerignore" Link=".dockerignore"> <None Include="..\.dockerignore" Link=".dockerignore">
<DependentUpon>$(DockerDefaultDockerfile)</DependentUpon> <DependentUpon>$(DockerDefaultDockerfile)</DependentUpon>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -71,9 +73,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="SeedLeaveData.xlsx"> <None Update="SeedLeaveData.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -65,13 +65,13 @@ COPY . .
WORKDIR "/src/BMA.EHR.Leave" WORKDIR "/src/BMA.EHR.Leave"
# 3. Build แบบ Release # 3. Build แบบ Release
RUN dotnet build "BMA.EHR.Leave.csproj" -c Release -nowarn -o /app/build RUN dotnet build "BMA.EHR.Leave.csproj" -c Release -o /app/build
# --------------------------- # ---------------------------
# Publish stage # Publish stage
# --------------------------- # ---------------------------
FROM build AS publish FROM build AS publish
RUN dotnet publish "BMA.EHR.Leave.csproj" -c Release -nowarn -o /app/publish /p:UseAppHost=false RUN dotnet publish "BMA.EHR.Leave.csproj" -c Release -o /app/publish /p:UseAppHost=false
# --------------------------- # ---------------------------
# Final runtime image # Final runtime image