title: Docker Container in Azure Logic App fails does not exit properly
body: <p>I have a curious issue getting a docker container set up to run and exit properly in an Azure logic app.</p>
  
  <p>I have a python script that prints hello world, then sleeps for 30 minutes. The reason for sleeping is to make the script run longer so that I can test if the container in the logic app exits at the right moment, when the script is done running and not when the loop times out.</p>
  
  <p>First, I confirm that the container is running properly and exiting properly in powershell:</p>
  
  <pre><code>    PS C:\Users\cgiltner&gt; docker run helloworld
      Running 'Hello World' at 2019-11-26 17:53:48
      Hello, World!
      Sleeping for 30 minutes...
      Awake after 30 minutes
      PS C:\Users\cgiltner&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/o7dDa.png" rel="nofollow noreferrer">I have the container set up in a logic app as follows, there is an “Until” loop that is configured to run until “State” = “succeeded”</a></p>
  
  <p><a href="https://i.stack.imgur.com/fB1AV.png" rel="nofollow noreferrer">But when I run it, the “until” loop continues for 1 hour, which is the default timeout period for an until loop (PT1H)</a></p>
  
  <p><a href="https://i.stack.imgur.com/0GHxX.png" rel="nofollow noreferrer">Looking at the properties of the container, I can see that the state of the container never changed from “Running”</a></p>
  
  <p>Just to clarify, the container IS running and executing the script/docker container successfully. The problem is that it is not exiting when the script is actually done, rather it is waiting until the timeout period is done. There is not an error message or any failure indicating that it times out, it just simply moves to the next step. This has big implications in a complex logic app where multiple steps need to happen after containers run, it causes things to take hours in the app.</p>