when I'm running docker build command its shows this error :
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. The command 'cmd /S /C dotnet restore' returned a non-zero code: 1
can anyone help me with that
CodePudding user response:
dotnet restore should be run in a project directory here you are stating WORKDIR /app , but copying in a strange directory named /path/to/dir/in/image running dotnet restore and then again copying to /app
it seems that you are using some kind of manual and author is forcing you to edit "/path/to/dir/in/image" with your path, but you've just copy-pasted the string
try to
WORKDIR /app
COPY . ./
RUN dotnet restore
RUN dotnet publish -c Release -o out