I am new in the Docker-World and i struggle very hard to create a Docker Image in Azure DevOps.
So First i created a Angular ASP.NET Core 2.2 Webapplication on VS 2019.
Then i committed this in Azure DevOps & configure the Pipline for manuell or automatic build process which create a docker image. After then i create a Docker file in VS2019 -> Project -> ADD Docker Support -> Linux.
Conclusion when i start my pipeline so I get this error
COPY failed: stat /var/lib/docker/tmp/docker-builder088029891/WebapplicationTestLinuxDocker/WebapplicationTestLinuxDocker.csproj: no such file or directory /usr/bin/docker failed with return code: 1
Projectstructure:
My Docker File looks like:
And my .dockerignore have this:
I thank you in advance and I hope you can help me! :)
the source paths are relative to the Dockerfile. So in your Dockerfile it says:
["WebapplicationTestLinuxDocker/WebapplicationTestLinuxDocker.csproj","WebapplicationTestLinuxDocker/"]
change it to:
["WebapplicationTestLinuxDocker.csproj","WebapplicationTestLinuxDocker/"]
then go down two lines and where it says:
COPY . .
change it to:
COPY . WebapplicationTestLinuxDocker/
Hope that works!
Tim
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With