sdk-container-builds icon indicating copy to clipboard operation
sdk-container-builds copied to clipboard

Does it support Azure function apps at all?

Open findajay opened this issue 2 years ago • 11 comments

Is it possible to containerize azure function apps using this sdk ?

findajay avatar Apr 04 '23 14:04 findajay

Hi @findajay - do you have a sample application we could try? I looked at some existing Azure Functions documentation here which suggests that isolated Azure Functions have to use a specific base image. If that's all that is required you could try pointing to that specific base image by using the ContainerBaseImage MSBuild property. In the meantime we can reach out to our partner teams about a more deep integration.

baronfel avatar Apr 04 '23 16:04 baronfel

@baronfel Thanks for your response. I have tried using mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated6.0 this base image for .net6 isolated function app and it does not work for me. I will upload the code to my GitHub and share the link but I am not doing anything special, just created a new .net6 isolated function app using visual studio and tried building container image using sdk-container.

findajay avatar Apr 04 '23 19:04 findajay

@baronfel Here is the sample app https://github.com/findajay/functionwithdocker/tree/master/functionwithdocker. In this app I am able to generate container image using dockerfile but not by using skd container dotnet publish.
Note : It does also work for web application in same repository https://github.com/findajay/functionwithdocker/tree/master/WebApplication1

findajay avatar Apr 05 '23 04:04 findajay

@baronfel Can you prioritize this issue in June 30 milestone. We have been waiting a long for this? Thanks

findajay avatar Jun 21 '23 21:06 findajay

I did a sample of what integration with AzureFunctions might look like in this gist - this is something the Azure Functions team would be involved in maintaining, though.

baronfel avatar Jul 24 '23 18:07 baronfel

@baronfel Thanks for taking time and focus on this. I hope azure functions team will take it up.

findajay avatar Jul 24 '23 18:07 findajay

I need to reach out to them to make their getting-started templates compatible with our tech anyway, so I expect this will come up :)

baronfel avatar Jul 24 '23 18:07 baronfel

How can I track the progress on this? Is it going to be part of this issue or in another one on the functions team side? Thanks!

ggirard07 avatar Aug 10 '23 21:08 ggirard07

I think changes has been done as part of this ticket https://github.com/dotnet/sdk-container-builds/issues/402. Not sure if they reached destination repository or not. @baronfel Could you please confirm this if possible ?

findajay avatar Aug 30 '23 13:08 findajay

No, #402 is about publish profile support for console applications, not Azure Functions support for this tech.

baronfel avatar Aug 30 '23 13:08 baronfel

If this would be useful for you, please check out the issue I created on the azure-functions-core-tools repo: https://github.com/Azure/azure-functions-core-tools/issues/3355

baronfel avatar May 03 '24 14:05 baronfel

Closing as the Functions team has implemented support and will be releasing it soon.

baronfel avatar Oct 09 '24 15:10 baronfel

Is there any reference/version number we could track to determine when this is going to be publicly available?

ggirard07 avatar Oct 09 '24 17:10 ggirard07

https://github.com/Azure/azure-functions-dotnet-worker/pull/2671 Here's the PR on their side that implemented the support. It looks like this is in preview 2 of the 2.0 version of the functions SDK, which is already released: https://www.nuget.org/packages/Microsoft.Azure.Functions.Worker.Sdk/2.0.0-preview2

baronfel avatar Oct 09 '24 17:10 baronfel

Thanks for implementing this interesting feature.

ajay-apcoa avatar Jan 29 '25 08:01 ajay-apcoa