diff --git a/src/api/NetworkResurrector.Api/Dockerfile b/src/api/NetworkResurrector.Api/Dockerfile index fddb1a2..cab851b 100644 --- a/src/api/NetworkResurrector.Api/Dockerfile +++ b/src/api/NetworkResurrector.Api/Dockerfile @@ -1,23 +1,22 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. +#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:6.0-bullseye-slim AS base WORKDIR /app EXPOSE 80 FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build -WORKDIR /src +WORKDIR /buildspace COPY ["dependencies.props", "."] COPY ["Directory.Build.props", "."] COPY ["NuGet.config", "."] -COPY ["ReleaseNotes.xml", "."] -COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"] -COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"] -COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "NetworkResurrector.Api.PublishedLanguage/"] -COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"] -COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"] -RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj" -COPY src/api . -WORKDIR "/src/NetworkResurrector.Api" +COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "src/api/NetworkResurrector.Api/"] +COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "src/api/NetworkResurrector.Api.Application/"] +COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "src/api/NetworkResurrector.Api.Domain/"] +COPY ["src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj", "src/api/NetworkResurrector.Api.PublishedLanguage/"] +COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "src/api/NetworkResurrector.Api.Domain.Data/"] +RUN dotnet restore "src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj" +COPY --exclude=src/agent --exclude=src/server . . +WORKDIR "/buildspace/src/api/NetworkResurrector.Api" RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build FROM build AS publish