Share via

Azure Functions running zip deploy instead of Docker container

sb-toryo-pjt 145 Reputation points
2025-09-16T02:57:55.9033333+00:00

Summary:

I have an Azure Functions app configured to run as a Docker container. The linuxFxVersion is set to DOCKER|<image-name>:<tag>, and the image is hosted on Docker Hub. Authentication credentials are provided via App Settings:

  • DOCKER_REGISTRY_SERVER_URL: https://index.docker.io
  • DOCKER_REGISTRY_SERVER_USERNAME: <redacted>
  • DOCKER_REGISTRY_SERVER_PASSWORD: <redacted>

The image tag is specified via the Azure Portal's Deployment Center, and the app is configured as functionapp,linux,container.

However, when inspecting the runtime environment inside the container, I noticed that /home/site/wwwroot is mounted using fuse.zip, which indicates that the app is running in zip deploy mode rather than using the container’s internal code. The mount appears as follows:


fuse-zip on /home/site/wwwroot type fuse.fuse-zip (ro,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)

As a result, the function code included in the Docker image is being ignored, and changes made to the image are not reflected in the running app.

What I've verified:

  • WEBSITE_RUN_FROM_PACKAGE is not present in App Settings.
  • The Docker image has been updated and pushed to Docker Hub.
  • The image tag is correctly specified in the Deployment Center.
  • The app is running on Linux and is configured as a container-based Function App.
  • Despite this, /home/site/wwwroot is mounted from fuse.zip, and the container’s code is not being used.

Request:

I would like to:

  • Disable the zip deploy behavior and ensure that the function app uses the code from the Docker image.
  • Understand why fuse.zip is being mounted despite the container configuration.
  • Restore expected Docker-based behavior so that updates to the image are reflected in the app.

Note:

This message has been translated and composed with the help of AI.

If any additional information is needed to clarify the situation, please feel free to let me know.

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

0 comments No comments

Answer accepted by question author

Jerald Felix 12,695 Reputation points Volunteer Moderator
2025-09-16T04:04:30.41+00:00

Hello sb-toryo-pjt,

Thank you for your very detailed and well-documented question. This is a subtle but critical issue that can be quite confusing when it occurs. The behavior you're seeing, where /home/site/wwwroot is mounted with fuse.zip despite your Function App being configured to run from a Docker container, points to a conflict in the deployment mechanisms.

You are correct in your diagnosis: the fuse.zip mount indicates that the Functions runtime is operating in "Run From Package" mode, effectively ignoring the code within your Docker image [, ].

Why is this happening?

The root cause is almost certainly a lingering configuration from a previous deployment. Even if the WEBSITE_RUN_FROM_PACKAGE application setting is not currently present in your configuration, the underlying App Service platform can retain a "memory" of this deployment method.

This typically happens if the Function App was at any point deployed using a method that enables Run From Package, such as:

Zip Push Deployment: Using Azure CLI (az functionapp deployment source config-zip) or another tool that pushes a zip file directly.

Visual Studio Code Deployment: The Azure Functions extension in VS Code often defaults to using Run From Package mode for deployments.

When a zip deployment is performed with Run From Package enabled (or if the platform defaults to it), it creates a file named packagename.txt in the /home/data/SitePackages directory. This file tells the runtime which zip file to mount. This instruction can persist and take precedence over your Docker container configuration.

How to Fix It and Restore Docker Behavior

To force the Function App to use the code from your Docker container as intended, you need to explicitly clear out the conflicting Run From Package configuration.

Step 1: Clear the Package Setting via Azure CLI

The most reliable way to disable this behavior is to set the WEBSITE_RUN_FROM_PACKAGE setting to 0. This explicitly tells the platform not to use a package file.

Run the following Azure CLI command:

bash
az functionapp config appsettings set --name <your-function-app-name> --resource-group <your-resource-group> --settings WEBSITE_RUN_FROM_PACKAGE="0"

Even if this setting doesn't appear in the portal, setting it to 0 will override any cached or implicit configuration.

Step 2: Restart the Function App

After applying the setting, perform a full restart of your Function App from the Azure portal. This will force the runtime to re-evaluate its startup configuration.

Step 3: Verify the wwwroot Directory

Once the app has restarted, you can connect to the container's shell via the Kudu console (https://<your-function-app-name>.scm.azurewebsites.net/) and run the mount command again. You should no longer see the fuse.zip mount on /home/site/wwwroot. Instead, wwwroot should now reflect the directory structure from your Docker image's WORKDIR.

By explicitly disabling the Run From Package feature, you reset the deployment preference and allow the linuxFxVersion setting to correctly take control, ensuring your app runs the code from your container image as expected.

Best Regards,

Jerald Felix .

Was this answer helpful?

1 person found this answer helpful.

6 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.