Browse Source

调整

develop
H Vs 11 months ago
parent
commit
85f8b8cf71
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      NearCardAttendance.TcpServer/Dockerfile

+ 3
- 4
NearCardAttendance.TcpServer/Dockerfile View File

@@ -6,7 +6,6 @@ WORKDIR /app
EXPOSE 16662

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["nuget.config","."]
COPY ["NearCardAttendance.TcpServer/NearCardAttendance.TcpServer.csproj", "NearCardAttendance.TcpServer/"]
@@ -14,14 +13,14 @@ COPY ["NearCardAttendance.Model/NearCardAttendance.Model.csproj", "NearCardAtten
COPY ["NearCardAttendance.Common/NearCardAttendance.Common.csproj", "NearCardAttendance.Common/"]
COPY ["NearCardAttendance.Service/NearCardAttendance.Service.csproj", "NearCardAttendance.Service/"]
RUN dotnet nuget remove source nuget.org
RUN dotnet restore "./NearCardAttendance.TcpServer/./NearCardAttendance.TcpServer.csproj"
RUN dotnet restore "NearCardAttendance.TcpServer.csproj"
COPY . .
WORKDIR "/src/NearCardAttendance.TcpServer"
RUN dotnet build "./NearCardAttendance.TcpServer.csproj" -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet build "NearCardAttendance.TcpServer.csproj" -c Release -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./NearCardAttendance.TcpServer.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish "NearCardAttendance.TcpServer.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app


Loading…
Cancel
Save