Is there anyway to run a Linux App Service locally?

Jonathon Smyth 0 Reputation points

Whilst running our .Net Core application in the Azure Linux App Service, we are seeing a Segmentation Fault which results in the Service restarting causing downtime for our users. Unfortunately the tooling around debugging and logging within the Linux App Service aren't as fully featured as the Windows App Service, and our efforts to reproduce, analyse and fix the bug have been hampered by this.

We've since switched to the Windows App Service to help diagnose the issue, however we do not experience the Segmentation Fault in that environment. That does not inspire confidence that the bug is actually fixed.

I was wondering if there was a way to locally run the Linux App Service, like a docker container of sorts, so the issues of logging would be solved and we could better understand the issue we're facing on the Linux environment?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,663 questions
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 10,596 Reputation points Microsoft Employee

    @Jonathon Smyth You can run a Linux App Service locally using Docker. Azure provides a Docker container that you can use to run your Linux App Service locally. You can use this container to test your application and debug any issues that you are facing.

    Here are the steps to run a Linux App Service locally using Docker:

    Install Docker on your local machine.

    Pull the Azure App Service for Linux Docker container by running the following command in your terminal:

    docker pull

    Run the Docker container by running the following command in your terminal:

    docker run -d -p 8000:80 -e WEBSITES_PORT=80 -e WEBSITE_SITE_NAME=app_name -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=localRoleInstance

    Replace app_name with the name of your app.

    Access your app by navigating to http://localhost:8000 in your web browser.

    Once you have your app running locally, you can use the logging and debugging tools available in your development environment to diagnose any issues you are facing.

    0 comments No comments