Update Dockerfile to copy project files in the correct directory
This commit is contained in:
@@ -7,19 +7,19 @@ EXPOSE 443
|
|||||||
# Use the official Microsoft .NET SDK image to build the code.
|
# Use the official Microsoft .NET SDK image to build the code.
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||||
WORKDIR /buildapp
|
WORKDIR /buildapp
|
||||||
COPY ["/src/Managing.Api/Managing.Api.csproj", "Managing.Api/"]
|
COPY ["Managing.Api/Managing.Api.csproj", "Managing.Api/"]
|
||||||
COPY ["/src/Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"]
|
COPY ["Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"]
|
||||||
COPY ["/src/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"]
|
COPY ["Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"]
|
||||||
COPY ["/src/Managing.Application/Managing.Application.csproj", "Managing.Application/"]
|
COPY ["Managing.Application/Managing.Application.csproj", "Managing.Application/"]
|
||||||
COPY ["/src/Managing.Infrastructure.MongoDb/Managing.Infrastructure.MongoDb.csproj", "Managing.Infrastructure.MongoDb/"]
|
COPY ["Managing.Infrastructure.MongoDb/Managing.Infrastructure.MongoDb.csproj", "Managing.Infrastructure.MongoDb/"]
|
||||||
COPY ["/src/Managing.Common/Managing.Common.csproj", "Managing.Common/"]
|
COPY ["Managing.Common/Managing.Common.csproj", "Managing.Common/"]
|
||||||
COPY ["/src/Managing.Core/Managing.Core.csproj", "Managing.Core/"]
|
COPY ["Managing.Core/Managing.Core.csproj", "Managing.Core/"]
|
||||||
COPY ["/src/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"]
|
COPY ["Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"]
|
||||||
COPY ["/src/Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"]
|
COPY ["Managing.Domain/Managing.Domain.csproj", "Managing.Domain/"]
|
||||||
COPY ["/src/Managing.Application.Workers/Managing.Application.Workers.csproj", "Managing.Application.Workers/"]
|
COPY ["Managing.Application.Workers/Managing.Application.Workers.csproj", "Managing.Application.Workers/"]
|
||||||
COPY ["/src/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"]
|
COPY ["Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"]
|
||||||
COPY ["/src/Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"]
|
COPY ["Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.csproj", "Managing.Infrastructure.Exchanges/"]
|
||||||
COPY ["/src/Managing.Infrastructure.Database/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Database/"]
|
COPY ["Managing.Infrastructure.Database/Managing.Infrastructure.Databases.csproj", "Managing.Infrastructure.Database/"]
|
||||||
|
|
||||||
# Restore dependencies for all projects
|
# Restore dependencies for all projects
|
||||||
RUN dotnet restore "/buildapp/Managing.Api/Managing.Api.csproj"
|
RUN dotnet restore "/buildapp/Managing.Api/Managing.Api.csproj"
|
||||||
@@ -27,7 +27,7 @@ RUN dotnet restore "/buildapp/Managing.Api/Managing.Api.csproj"
|
|||||||
# Copy everything else and build
|
# Copy everything else and build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
WORKDIR "/buildapp/src/Managing.Api"
|
WORKDIR "/buildapp/Managing.Api"
|
||||||
RUN dotnet build "Managing.Api.csproj" -c Release -o /app/build
|
RUN dotnet build "Managing.Api.csproj" -c Release -o /app/build
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
@@ -37,5 +37,4 @@ FROM base AS final
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
#COPY Managing.Api/managing_cert.pfx .
|
#COPY Managing.Api/managing_cert.pfx .
|
||||||
COPY /src/appsettings.dev.json .
|
|
||||||
ENTRYPOINT ["dotnet", "Managing.Api.dll"]
|
ENTRYPOINT ["dotnet", "Managing.Api.dll"]
|
||||||
|
|||||||
Reference in New Issue
Block a user