Fixed dockerfile to copy the correct directory to the build file
continuous-integration/drone/push Build is passing Details

master
Xander Sigler 3 years ago
parent 2994876cab
commit abaac3051d

@ -3,17 +3,9 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Compile Remove="Models\Day1\**" />
<Content Remove="Models\Day1\**" />
<EmbeddedResource Remove="Models\Day1\**" />
<None Remove="Models\Day1\**" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />

@ -5,7 +5,7 @@ FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
WORKDIR /src WORKDIR /src
COPY ["AOC2021/AOC2021.csproj", "AOC2021/"] COPY ["AOC2021/AOC2021.csproj", "AOC2021/"]
RUN dotnet restore "AOC2021/AOC2021.csproj" RUN dotnet restore "AOC2021/AOC2021.csproj"
COPY [".", "AOC2021/."] COPY ["AOC2021/", "AOC2021/."]
WORKDIR "/src/AOC2021" WORKDIR "/src/AOC2021"
RUN dotnet build "AOC2021.csproj" -c Release -o /app/build RUN dotnet build "AOC2021.csproj" -c Release -o /app/build

Loading…
Cancel
Save