duongtt
duongtt

Reputation: 97

Docker - ASP.NET Core: Failed to build docker image in Visual studio 2019

I have an ASP.NET Core project which I want to build as docker image but it fails.

My project directory:

-myproject

--Blazor.Server

---Blazor.Server.csproj

---dockerfile

--Blazor.Shared

---Blazor.Shared.csproj

My dockerfile:

My dockerfile

When I build this dockerfile, I get the error below:

Error

I will be very thankful for any advise to solve this issue.

Upvotes: 0

Views: 166

Answers (1)

Guokas
Guokas

Reputation: 830

The docker engine didn't find resources through your path during building.

You should change your project structure as follows:

myproject
├─Blazor.Server
│  └─Blazor.Server.csproj
├─dockerfile
└─Blazor.Shared
   └─Blazor.Shared.csproj

Upvotes: 1

Related Questions