Closed SuPuL closed 1 year ago
Hi, i tried to create a docker image with the provided file. But I get a path problem. I tried running it
{gitroot}/src/docker build Lupusec2Mqtt and {gitroot}/src/Lupusec2Mqtt/docker build .
{gitroot}/src/docker build Lupusec2Mqtt
{gitroot}/src/Lupusec2Mqtt/docker build .
I'm always get this error: => ERROR [build 3/7] COPY [Lupusec2Mqtt/Lupusec2Mqtt.csproj, Lupusec2Mqtt/]
=> ERROR [build 3/7] COPY [Lupusec2Mqtt/Lupusec2Mqtt.csproj, Lupusec2Mqtt/]
So I tried to change the path to COPY ["Lupusec2Mqtt.csproj", "Lupusec2Mqtt/"]
COPY ["Lupusec2Mqtt.csproj", "Lupusec2Mqtt/"]
This seems to work but I get a problem from the dotnet restore command later on
=> ERROR [build 7/7] RUN dotnet build "Lupusec2Mqtt.csproj" -c Release -o /app/build 1.9s ------ > [build 7/7] RUN dotnet build "Lupusec2Mqtt.csproj" -c Release -o /app/build: #15 0.243 MSBuild version 17.3.2+561848881 for .NET #15 0.567 Determining projects to restore... #15 0.757 All projects are up-to-date for restore. #15 1.835 CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/src/Lupusec2Mqtt/Lupusec2Mqtt.csproj] #15 1.843 #15 1.843 Build FAILED. #15 1.843 #15 1.843 CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/src/Lupusec2Mqtt/Lupusec2Mqtt.csproj] #15 1.843 0 Warning(s) #15 1.843 1 Error(s) #15 1.844 #15 1.844 Time Elapsed 00:00:01.54 ------ executor failed running [/bin/sh -c dotnet build "Lupusec2Mqtt.csproj" -c Release -o /app/build]: exit code: 1
Do you have any idea what is wrong here?
Seems that the docker files needs to be placed in the src folder instead of the src/Lupusec2Mqtt folder. Do this the main is found.
src
src/Lupusec2Mqtt
main
Hi, i tried to create a docker image with the provided file. But I get a path problem. I tried running it
{gitroot}/src/docker build Lupusec2Mqtt
and{gitroot}/src/Lupusec2Mqtt/docker build .
I'm always get this error:
=> ERROR [build 3/7] COPY [Lupusec2Mqtt/Lupusec2Mqtt.csproj, Lupusec2Mqtt/]
So I tried to change the path to
COPY ["Lupusec2Mqtt.csproj", "Lupusec2Mqtt/"]
This seems to work but I get a problem from the dotnet restore command later on
Do you have any idea what is wrong here?