Hello,
Im trying to utilize Azure DevOps to setup a CI\CD pipeline. I am able to build and run my container locally on a windows 10 machine, however when I attempt to using the docker file to build within Azure DevOps build pipeline im getting an error on the container
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
I suspect that the issue is that Im not getting my source code DLLs included in my pipeline created image, I have be able to confirm this my taking my working container, sh access run an ls command, and I can see my dlls. On my pipeline created image, I do not see these DLLs when I perform the same command. I am only using the Dockerfile in the Web.Host project, I think im missing something.
4 Answer(s)
-
0
Here is a related article, you can take a look.
https://docs.aspnetzero.com/documents/aspnet-core-mvc/latest/Setting-Up-an-Azure-Pipeline-Mvc-Core
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
This does not address my real issue. My problem is getting the azure devops pipeline to build the container the same way that the build-with-ng.ps1 script does.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I think you need to publish your website as a self-contained package. to do this add your publish command
--self-contained trueoption.In your
build-with-ng.ps1file, you can replace the below lines:dotnet publish --output (Join-Path $outputFolder "Host") --configuration Releasedotnet publish --output (Join-Path $outputFolder "Public") --configuration Release
with these line:
dotnet publish -c Release -r linux-x64 --self-contained true -o (Join-Path $outputFolder "Host")dotnet publish -c Release -r linux-x64 --self-contained true -o (Join-Path $outputFolder "Public")
(I'm not sure to add double quotes to
(Join-Path $outputFolder "Host")you can change it to"(Join-Path $outputFolder "Host")"if it doesn't work.)note that while we use
linux-x64option for Linux images,win-x64is used for Windows images.Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thank you that worked!
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)