Skip to content

Docker Build Error for 4.2.5 launchSettings.json was not found #186

@OBWands

Description

@OBWands

I've been encountering the below error when trying to build a Docker image for 4.2.5 where the launchSettings.json file can't be found.

I see in LogShark.csproj the added line in 4.2.5 to add launchSettings.json, but not anything in the actual repository referencing it.

<Content Include="Properties\launchSettings.json">

I've been able to successfully create the image using 4.2.4 without issue. Is there anything that I may be missing? Appreciate any help.

Error Message:

 > [build 4/4] RUN dotnet publish "LogShark/LogShark.csproj" -r linux-x64 --self-contained false -c Release /p:Version=4.2.5 -o out:                            
0.348   Determining projects to restore...                                      
3.497   Restored /app/LogShark.Shared/LogShark.Shared.csproj (in 3.01 sec).     
16.32   Restored /app/LogShark/LogShark.csproj (in 15.83 sec).                  
17.16 /app/LogShark.Shared/LogReading/Readers/YamlConfigLogReader.cs(44,33): warning CS0168: The variable 'e' is declared but never used [/app/LogShark.Shared/LogShark.Shared.csproj]
17.16 /app/LogShark.Shared/LogReading/Readers/YamlConfigLogReader.cs(33,30): warning CS0168: The variable 'ex' is declared but never used [/app/LogShark.Shared/LogShark.Shared.csproj]
17.18   LogShark.Shared -> /app/LogShark.Shared/bin/Release/net8.0/LogShark.Shared.dll
17.54 /app/LogShark/Plugins/Bridge/Model/BridgeClientWorkerEvent.cs(10,29): warning CS0109: The member 'BridgeClientWorkerEvent.StartTime' does not hide an accessible member. The new keyword is not required. [/app/LogShark/LogShark.csproj]
17.54 /app/LogShark/Plugins/Bridge/Model/ProtocolQuery.cs(58,30): warning CS0168: The variable 'e' is declared but never used [/app/LogShark/LogShark.csproj]
17.54 /app/LogShark/Plugins/Bridge/BridgePlugin.cs(338,38): warning CS0168: The variable 'ex' is declared but never used [/app/LogShark/LogShark.csproj]
17.54 /app/LogShark/Plugins/Bridge/BridgePlugin.cs(351,38): warning CS0168: The variable 'ex' is declared but never used [/app/LogShark/LogShark.csproj]
17.54 /app/LogShark/Plugins/Config/ConfigPlugin.cs(92,30): warning CS0168: The variable 'ex' is declared but never used [/app/LogShark/LogShark.csproj]
17.54 /app/LogShark/Plugins/Prep/PrepEvent.cs(10,40): warning CS0414: The field 'PrepEvent.NotApplicable' is assigned but its value is never used [/app/LogShark/LogShark.csproj]
17.60 /usr/share/dotnet/sdk/8.0.418/Microsoft.Common.CurrentVersion.targets(5321,5): error MSB3030: Could not copy the file "/app/LogShark/Properties/launchSettings.json" because it was not found. [/app/LogShark/LogShark.csproj]
------
Dockerfile:4
--------------------
   2 |     WORKDIR /app
   3 |     COPY . ./
   4 | >>> RUN dotnet publish "LogShark/LogShark.csproj" -r linux-x64 --self-contained false -c Release /p:Version=4.2.5 -o out
   5 |     
   6 |     FROM mcr.microsoft.com/dotnet/runtime:8.0
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet publish \"LogShark/LogShark.csproj\" -r linux-x64 --self-contained false -c Release /p:Version=4.2.5 -o out" did not complete successfully: exit code: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions