title: Google Managed VM error - custom entry point
body: <p>I'm running a custom managed VM with PHP, HHVM, nginx, Centos.</p>
  
  <p>I'm having issues running it locally and keep getting the </p>
  
  <blockquote>
    <p>ValueError: The --custom_entrypoint flag must be set for custom runtimes</p>
  </blockquote>
  
  <p>issue. This happens if I use 'dev_appserver.py app.yaml' or 'gcloud preview app run app.yaml' gcloud -v produces the following:</p>
  
  <blockquote>
    <p>$: gcloud -v</p>
    
    <p>Google Cloud SDK 0.9.82</p>
  </blockquote>
  
  <p>I have also tried fixing the SDK version as per:
  <a href="https://stackoverflow.com/questions/30945321/running-node-js-on-google-cloud-but-error-running-with-docker/30947709">Running node.js on google cloud, but error running with docker</a></p>
  
  <p>This results in: </p>
  
  <blockquote>
    <p>Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by:
    boot2docker shellinit</p>
  </blockquote>
  
  <p>I'm not using boot2docker and Docker is running with 'docker -d -H tcp://localhost:2376' and</p>
  
  <p>Docker Info:</p>
  
  <blockquote>
    <p>$ docker info</p>
    
    <p>Containers: 3</p>
    
    <p>Images: 137</p>
    
    <p>Storage Driver: aufs</p>
    
    <blockquote>
      <p>Root Dir: /var/lib/docker/aufs</p>
      
      <p>Backing Filesystem: extfs</p>
      
      <p>Dirs: 143</p>
    </blockquote>
    
    <p>Execution Driver: native-0.2</p>
    
    <p>Kernel Version: 3.19.0-31-generic</p>
    
    <p>Operating System: Ubuntu 15.04</p>
    
    <p>CPUs: 4</p>
    
    <p>Total Memory: 11.43 GiB</p>
  </blockquote>
  
  <p>Enviroment Variables:</p>
  
  <blockquote>
    <p>$ echo $DOCKER_HOST &amp;&amp; echo $DOCKER_CERT_PATH &amp;&amp; $DOCKER_TLS_VERIFY</p>
    
    <p>tcp://localhost:2376</p>
    
    <p>/home/mgane/ca</p>
    
    <p>1</p>
  </blockquote>
  
  <p>Or
  <a href="https://stackoverflow.com/questions/31280849/how-to-fix-the-custom-entrypoint-flag-must-be-set-for-custom-runtimes">How to fix &quot;`The --custom_entrypoint flag must be set for custom runtimes`&quot;?</a></p>
  
  <p>This results in the same issues. Commenting out lines in the python scripts just creates more mess and even more errors.</p>
  
  <p>What am I supposed to actually specify as the custom endpoint when running nginx / hhvm? The image works fine when running with docker. The docs write as follows for custom entrypoint:</p>
  
  <blockquote>
    <p>--custom-entrypoint CUSTOM_ENTRYPOINT</p>
    
    <blockquote>
      <p>Specify an entrypoint for custom runtime modules. This is required when
          such modules are present. Include "{port}" in the string (without
          quotes) to pass the port number in as an argument. For instance:
          --custom_entrypoint="gunicorn -b localhost:{port} mymodule:application"</p>
    </blockquote>
  </blockquote>
  
  <p>I've tried something like</p>
  
  <blockquote>
    <p>$ gcloud preview app run app.yaml --custom-entrypoint="php -v"</p>
  </blockquote>
  
  <p>which then runs the image, but all I get is 503 errors.</p>
  
  <p>Does anyone know what the entrypoint command for a custom nginx one should be?
  Google has a hello-world docker here: <a href="https://github.com/GoogleCloudPlatform/appengine-nginx-hello" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/appengine-nginx-hello</a></p>
  
  <p>Thanks!</p>