Error publishing Docker image to Azure container registry - docker

I am trying to publish my first Docker image (built from a simple .Net core console app) to my Azure container registry. The process started and ran for about two minues before errored out. Here is the error:
The log mentioned contains the same imformation.
It looks like the error is related to some Nuget package:
But the problem is that I don't have this "C:\Program Files\dotnet\sdk\5.0.408" folder on my machine:
and I don't have a reference to that package in my project:
What am I missing? and what should do to fix it? I am totaly new to Docker so any inputs will be highly appreciated.
UPDATE
Here is my firewall settings - it doesn't have any Docker related items in it! Could that be the problem? If so, how do I fix it?

• I would advise you to please check the installation of the latest version of the ‘Docker Desktop for Windows’ software that is supported by ‘ASP .Net Core Web App’ long term release version. It should be compatible to the created ‘.Net Core Web App’ version such that when you are trying to publish your web app image from the Visual Studio App to the Azure container registry, the ‘Docker Desktop for Windows’ will be able to sync push the image to the linked ACR.
• Would also suggest you to please check whether the Linux kernel package for x64 machines is updated or not. If not, would suggest you to please download the WSL2 Linux Kernel update package, install it and restart the ‘Docker Desktop for Windows’ software on your system. This will ensure that the Linux kernel set for the Web app in Visual studio is accordingly setup in ‘Docker Desktop for Windows’ application.
• Finally, please check the local Windows firewall for the inbound allow rules for the ‘Docker Desktop for Windows’ software whether its backend is allowed to run and connect to the Azure Container Registry or not as below: -
Also, ensure that the ‘Azure.Container.ContainerRegistry’ library is installed in your environment through the Visual Studio extension gallery as it is required for developing a .Net Web app code. Please ensure that ‘Microsoft Authentication’ libraries are also installed correctly in your Visual Studio repository for successful connections. I followed the below documentation link for publishing Docker image to Azure Container Registry and I was able to successfully connect to the ACR as shown below: -
https://learn.microsoft.com/en-us/visualstudio/containers/hosting-web-apps-in-docker?view=vs-2022
Thus, would suggest you follow the given link.

Related

Docker hub connected via CLI and Docker desktop... #matterlabs/hardhat-zksync-solc plugin still fails to connect to docker hub on M1 Mac Air 2020

I can only reproduce this error on my Mac Air. I have a Mac tower from 2010 that I've opencore'd to 12+ and it does not have this issue.
For the life of me, I cannot get through this error with the #matterlabs/hardhat-zksync-solc plugin. As you can see in the window behind my CLI, I am connected to docker hub through Docker Desktop. I can also log into docker via the CLI using docker login. I've already tried logging in and out using various methods.
My last suspicion is that maybe a port is natively blocked? Where would I begin trying to troubleshoot this?
Just answering this to mention that support for Docker has been deprecated and it's recommended that users use binary as compiler source to compile contracts with zksolc.
You can find more info on how to compile contracts on zkSync here: https://v2-docs.zksync.io/dev/developer-guides/contracts/contracts.html
And specific information about the zksolc harhdat plugin here: https://v2-docs.zksync.io/api/hardhat/plugins.html#hardhat-zksync-solc

How to import a project from Docker into Android Studio

I am using this repo github.com/opengisch/QField to create a Docker image. It all went ok and I can see the Docker container is running. This runs a local machine and I am not able to see where the files downloaded by Docker are saved on Widows 10. I have not used Docker before.
I need to open this project in Android Studio but I cannot find any guide how to do this. I have tried to locate files and directly download to Windows but dont seem to have any luck.

Providing a Dev-Cert for an ASP.Net Core 3.1 project running in Docker?

When running my ASP.Net Core 3.1 web app in IISExpress the Dev-Cert I have in place is found and used to provide HTTPS, but when I try to run the same app on the same machine but in a Docker Windows container the certificate is not found.
I assume there are some steps needed to make the certificate visible in the Docker container but I've not been able to find anything current discussing this.
What needs to be done to get a Dev https app running in a Windows Docker container? (running from Visual Studio 2019)

Visual Studio Container Tools requires Docker to be running before building, debugging or running a containerized project

I am working on .Net core Microservices. I installed Docker Toolbox containing docker cli and kitematics. After that i created a simple (.Net core) web api project in visual studio 2017 and also enable docker support.
But when i hit F5 to run the program it shows following error and doesn't run.
Visual Studio Container Tools requires Docker to be running before building, debugging or running a containerized project.
Please review the attached image.
Visual studio error on running the project
If i build and run the project using docker cli, it's working. The problem is with visual studio 2017.
In my case I had an erroneous reference in Dependencies > Packages to Microsoft.VisualStudio.Azure.Containers.Tools.Targets
Removing the reference fixed the error.
The problem occurs because Visual studio container is unable to connect to docker for windows and solution for this is to open the visual studio 2017 from Docker CLI using following command.
/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/Community/Common7/IDE/devenv.exe C:\\PATH\\TO\\MY\\SOLUTION.sln
Here:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe
is the location of my devenv.exe file and 2nd parameter
C:\\PATH\\TO\\MY\\SOLUTION.sln
shows the path of solution file.
For further details of this solution, click Here.
In my case, this issue was caused by a disabled BIOS Virtualization. To enable Virtualization, see here. In order to check whether Virtualization is already enabled, start Task Manager > Performance > find Virtualization. If you are hosting your docker container application in full feature IIS, make sure you start Visual Studio as an Administrator.
I was getting the same error when I was trying to rebuild my solution after changing my .Net Core 2.0 application to .Net Core 2.2. As I reset my windows, there was no docker installed on my machine. To fix this all I had to do is to install the docker for desktop as I wanted to containerize my applications.
Once you install the Docker, it will ask you to enable Hyper-V and Container features. By clicking the Ok button in the pop up as preceding, will enable this features for you.
Your computer will be restarted automatically and once it is done, you should be able to see that the Virtualization is enabled in the task bar.
After this I was not facing this error.
Check shared folders inside the default virtual machine setting in Virtual box to make sure you shared the disk where you project located. By default shared only C:\Users. So alternatively you can move your project somewhere inside C:\Users folder (for example in Desktop folder)
I was facing the same issue and I resolved it by switching to IIS Express instead of Docker in debug menue on visual studio 2017

Enable Windows Identity Foundation in docker

In our current project we develop an ASP.net MVC application hosted in an docker (Docker Desktop for Windows) container using the windows server core image (https://hub.docker.com/r/microsoft/windowsservercore/). Everything is working well but now we would like to use the Windows Identify Foundation (WIF) for authentication with an ADFS.
Unfortunately, the Windows Server Core image for docker does not support the WIF feature and it cannot be installed.
Does someone have an idea how to use the WIF inside of a docker container and/or experience with installing the feature in this image?
Is their an alternative image with the feature enabled?
Similar topics without docker such as:
https://support.microsoft.com/en-us/help/3044149/you-can-t-install-windows-identity-foundation-in-windows-core
https://blogs.technet.microsoft.com/server_core/2012/05/09/configuring-the-minimal-server-interface/
Did not help.
I know this is an old question, but I recently ran into the same problem and wanted to share the resolution I was able to come up with. In my case, I was working with a legacy software solution that referenced "Microsoft.IdentityModel.dll" (installed by WIF), and it was not as easy to just switch it out to something else.
I installed WIF on my laptop (Windows 10) and then added the file to my docker image
C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll
Then, add a PowerShell script to your DOCKERFILE to install that assembly into the GAC manually. Here's a good blog post showing how to do that as well:
https://www.andrewcbancroft.com/2015/12/16/using-powershell-to-install-a-dll-into-the-gac/
Hope it helps!
We could solve our problems with OWIN.
Bas Lijten posted a nice tutorial on this:
http://blog.baslijten.com/configure-claims-based-web-applications-using-owin-wsfederation-middleware/
We configured the usage of WS-Fed with Owin but did not use an Embedded STS. Instead we created a standalone identityserver instance to test the ADFS integration.
On GitHub you can find an example for such an identity server configuration:
https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/SelfHost%20(InMem%20with%20WS-Fed)

Resources