petabridge / akkadotnet-cluster-workshop

Akka.NET + Kubernetes + Akka.Cluster Training Course
https://petabridge.com/cluster/
Apache License 2.0
99 stars 32 forks source link

Running build failed #70

Open camerontwoodall opened 4 years ago

camerontwoodall commented 4 years ago

While attempting to run ./build.cmd docker the script fails when attempting to build the Akka.CQRS.Pricing.Service project and BuildDockerImages reports failure.

Running build failed. Error: System.Exception: docker build failed. D:\Dev\akkadotnet-cluster-workshop\src\Akka.CQRS.Pricing.Service\Akka.CQRS.Pricing.Service.csproj at Microsoft.FSharp.Core.Operators.FailWith[T](String message) at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc2 action, IEnumerable1 source) at FSI_0005.Build.clo@302-40.Invoke(Unit _arg1) at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

anatoliin commented 4 years ago

Have the same issue:

Step 7/11 : COPY ./bin/Release/netcoreapp2.1/publish/ /app
COPY failed: stat /var/lib/docker/tmp/docker-builder838578560/bin/Release/netcoreapp2.1/publish: no such file or directory
Running build failed.
Error:
System.Exception: docker build failed. C:\dev\akkacluster\src\Akka.CQRS.Pricing.Service\Akka.CQRS.Pricing.Service.csproj
   at Microsoft.FSharp.Core.Operators.FailWith[T](String message)
   at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source)
   at FSI_0005.Build.clo@301-40.Invoke(Unit _arg1) in C:\dev\akkacluster\build.fsx:line 347
   at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 626

It looks like path is incorrect. There is /var/lib/docker/tmp/docker-builder838578560 prefix in it.

anatoliin commented 4 years ago

Solved the issue by adding global.json file to the solution folder, specifying sdk version 2.1.403.

{
  "sdk": {
    "version": "2.1.403"
  }
}

The issue was caused by build path changes in core 3.0

Aaronontheweb commented 4 years ago

@anatoliin we have an open PR for .NET Core 3.0 support - I might need to take a second look at that.

jg11jg commented 4 years ago

i had the issue too. And to clarify, I did:

dotnet --version 2.2.207 3.1.200-preview-015002

So I used 2.2.207 instead of 2.1.403 in the global.json as per above, and then I was able to run ./build.cmd docker just fine.