Open chriswill opened 4 years ago
Hey @chriswill! Did you figure this out? I was doing some tests and I'm able to run thew container successfully, but one of my colleagues can't. From what I've been reading, it might be related to slow network speeds. How did you sort this?
@DanielSSilva I'm no longer working with containers on this project any longer, so I didn't create or record a solution.
In my case, the resolution was updating the package Microsoft.VisualStudio.Azure.Containers.Tools.Target.
Install-Package Microsoft.VisualStudio.Azure.Containers.Tools.Targets -Version 1.15.1
Using Visual Studio 2019 16.6.3, I create a bare Function app, with an http trigger.
Once this is complete, I right-click the project and choose Add Docker Support. I am running Linux docker containers on a Windows machine.
Pressing F5 to debug run the app, the container appears to build successfully. I can also build it from the command line:
I can also run it from the command line, when using
docker run
.However, starting the app seems to fail with this error when run with Visual Studio F5:
I already have the cli tools on my Windows host. How would I get them into the container that I'm building? Wouldn't the image
mcr.microsoft.com/azure-functions/dotnet:3.0
that I'm using already have them?This is my Dockerfile, which is the standard one created by VS:
When I build this file from the command line using the parameters that VS uses, I get only 5 steps:
When I build this container from the command line using a more limited series of parameters, I get an expected 16 steps:
It seems that the VS-supplied parameter
--target base
is the one that is removing the additional steps.