Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Functions Docker Deployment Linux workers are not available in resource group

Trying to deploy a nginix container from Azure Container Registry through function app,

Getting an error as,

Linux workers are not available in resource group

How to enable linux workers to a resource group?

Dockerfile for deployment,

FROM nginx
COPY dist /usr/share/nginx/html
like image 825
Kannaiyan Avatar asked Jun 25 '18 22:06

Kannaiyan


People also ask

How do I deploy an azure function to a docker container?

To deploy to an existing app by using a custom container, in Azure Functions Core Tools, use the func deploy command. When to use it: Use the Docker container option when you need more control over the Linux environment where your function app runs. This deployment mechanism is available only for Functions running on Linux.

How do I deploy to Linux with Azure Functions?

By default, both Azure Functions Core Tools and the Azure Functions Extension for Visual Studio Code perform remote builds when deploying to Linux. Because of this, both tools automatically create these settings for you in Azure. When apps are built remotely on Linux, they run from the deployment package.

What is the recommended deployment technology for Azure Functions?

When to use it: Zip deploy is the recommended deployment technology for Azure Functions. You can deploy a Linux container image that contains your function app. How to use it: Create a Linux function app in the Premium or Dedicated plan and specify which container image to run from. You can do this in two ways:

When to use external package URL for Azure Functions deployment?

When to use it: External package URL is the only supported deployment method for Azure Functions running on Linux in the Consumption plan, if the user doesn't want a remote build to occur. When you update the package file that a function app references, you must manually sync triggers to tell Azure that your application has changed.


2 Answers

Seems like you can't have linux and windows resources in the same resource group

There is a current limitation in regards to not mixing Windows and Linux apps in the same resource group as well.

https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-intro#limitations

So you're only option at the moment is to create a new resource group for linux resources

like image 66
Frank Fu Avatar answered Sep 25 '22 21:09

Frank Fu


[Update 2022-02-16]

It seems to be possible to now to share a resource group between Linux and Windows app service plans: https://docs.microsoft.com/en-us/azure/app-service/overview#limitations

[Original]

It is not possible to create a linux app service plan and a windows app service plan in the same resource group AND in the same location, but you can use the same resource group and deploy both plans in different locations.

Based on a current limitation, for the same resource group you cannot mix Windows and Linux apps in the same region.

https://docs.microsoft.com/en-us/azure/app-service/containers/app-service-linux-intro#limitations

Though I have discovered that the same error can also occur if you have created an app service certificate via the REST api or via terraform (which is also using the REST api) BEFORE creating the linux app service plan. You must create the linux app service plan before creating the certificate in the same location.

like image 41
PSanetra Avatar answered Sep 25 '22 21:09

PSanetra