0

I deploy a containerized python function on Azure using the official Microsoft guide.

The application is running and I am able to call my function (it's an http trigger function), but I don't know how to connect to the docker container it is running. If I use the Kudu console from the Azure portal on the Function App service, the docker command is not available and I can't see any file in the /home/site/wwwroot

If I go to the LogStream from Kudu, I can see some docker commands like

Pull Image successful, Time taken: 1 Seconds
2024-08-07T15:15:50.990Z INFO  - Starting container for site
2024-08-07T15:15:50.991Z INFO  - docker run -d --expose=80 --name ** -e WEBSITE_USE_DIAGNOSTIC_SERVER=false -e DOCKER_CUSTOM_IMAGE_NAME=** -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=** -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=** -e WEBSITE_INSTANCE_ID=**

But nothing else. Does anyone know where exactly is my container running and how can I access its logs and connect to it to inspect files?

1 Answer 1

1

When you create a Container App Environment function, the Container Apps environment creates a Resource Group with same name as environment, inside that Resource Group your container app will be created.

If you want to use console of the container you need to open container and select Console you will get option to choose startup command to use the console.

Sign up to request clarification or add additional context in comments.

2 Comments

I see. I think my problem is that I didn't create an environment and I chose the Consumption plan. Will it be more expensive if going for the container apps env? Thanks.
@MihaiPodaru yes, it will be costly than consumption plan. In consumption, you cannot access container logs or connect, as that plan is serverless plan.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.