1

I try to create my first dummy Azure Function App from the Docker container.

The issue is that after creation from the published docker image, I can see the default page, but I do not see any functions (the default function should be displayed).

The function also does not work. When I enter the function HTTP, the Error 404 is returned.

default page

enter image description here

empty function list enter image description here

Here is my setup, I am using default configuration only.

# Create the default azure function app.
py -m venv .venv
.venv\scripts\activate
func init --worker-runtime python --docker

# Build with the docker.
docker build -f Dockerfile -t <function-app-name> .

# Verify, that the function is working.
docker run -p 8080:80 --name <name> <function-app-name>
http://localhost:8080/api/PythonFunctionExample

# Push image into the azure docker container.
docker login <docker-container-address>.azurecr.io
docker tag <docker-tag> <docker-container-address>.azurecr.io/<function-app-name>
docker push <docker-container-address>.azurecr.io/<function-app-name>

# I Created Azure Function App from the Azure Portal.
## Docker image was selected from the Docker container registry.
## Azure Plan "Functions Premium" was selected.

Any idea what might be an issue, what did I forgot?

Muflix
  • 6,192
  • 17
  • 77
  • 153
  • 1
    Sorry, but it seems like you created the function app, and you created the docker image which you pushed to ACR, but where did you publish / push the docker image to the function itself – Jano du Toit Aug 04 '22 at 10:23
  • The azure function app was created in the Azure portal and I selected that it should use the functions from the docker image that I selected in the azure app configuration wizard. The image is working locally but Azure probably does not recognized the functions within the docker image. I don't know how to troubleshoot this. – Muflix Aug 04 '22 at 13:59
  • Anything in the logs? I assume this is an HTTP trigger? – Jano du Toit Nov 02 '22 at 04:16

1 Answers1

2

You should select the App Service Plan(Premium V2 P1v2) not Functions Premium for the Docker container function because the Premium Function are serverless function.

raviteja k
  • 94
  • 1
  • 1
  • 6