Azure App Service using a Windows container Failing and restarting - Modify Compute System failed

tlcs 26 Reputation points

Hey all,

This question has been asked before, but the answer didn't seem to work for me. I've set up a simple hello_world (Python, Flask) windows container with the following image:

Unfortunately every time I try to start it up I get the following:

21/04/2020 09:54:59.213 INFO - Site: - Start container succeeded. Container: xxx
21/04/2020 09:55:02.268 INFO - Site: - Attempting to stop container: xxx
21/04/2020 09:55:03.126 INFO - Site: - Container stopped successfully. Container Id: xxx
21/04/2020 09:55:03.126 INFO - Site: - Purging pending logs after stopping container
21/04/2020 09:55:03.158 INFO - Site: - Purging after container failed to start
21/04/2020 09:55:03.158 ERROR - Site: - Unable to start container. Error message: Modify Compute System failed.

The container works great local, but once its in the app service it won't start. I tried running it with different windows images but no luck. Anybody have some advice?

Kind regards,


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,194 questions
{count} vote

Accepted answer
  1. Ryan Hill 26,856 Reputation points Microsoft Employee

    @tlcs took long enough but I got a docker image that works. For background, Windows Container images are still a preview feature and more than likely the cause of the issue. The python base image I got working is one based on the cached instances Azure has right now. I'm no docker expert but I think

    FROM python:3.8

    was causing an issue. See my docker image below. I did verify this works on both Windows and Linux app service plans so enjoy. Hope this helps get your unblocked.


    FROM python:3.8-windowsservercore-1809  
    COPY . /app  
    WORKDIR /app  
    RUN pip install -r /app/requirements.txt  
    EXPOSE 5000  
    CMD ["python", ""]  

    from flask import Flask  
    app = Flask(__name__)  
    def home():  
        return "Hello, Flask!"  
    if __name__ == "__main__": ,host='')  

0 additional answers

Sort by: Most helpful