title: How do I run a google appengine docker image on a compute engine instance?
body: <p>I have the following docker file:</p>
  
  <pre><code>FROM gcr.io/google_appengine/python-compat
  MAINTAINER Me@me.com
  
  RUN apt-get update
  RUN apt-get -y upgrade
  
  ADD ./app/ /app
  ADD app.yaml /app/
  
  RUN mkdir -p /var/log/app_engine
  </code></pre>
  
  <p>I create the log directory because otherwise I get the following error</p>
  
  <pre><code>sudo docker run gcr.io/MY-PROJECT/ae-image
  Traceback (most recent call last):
    File "/home/vmagent/python_vm_runtime/vmboot.py", line 133, in &lt;module&gt;
      run_file(__file__, globals())
    File "/home/vmagent/python_vm_runtime/vmboot.py", line 129, in run_file
      execfile(_PATHS.script_file(script_name), globals_)
    File "/home/vmagent/python_vm_runtime/google/appengine/tools/vmboot.py", line 32, in &lt;module&gt;
      initialize.InitializeFileLogging()
    File "/home/vmagent/python_vm_runtime/google/appengine/ext/vmruntime/initialize.py", line 92, in InitializeFileLogging
      APP_LOG_FILE, maxBytes=MAX_LOG_BYTES, backupCount=LOG_BACKUP_COUNT)
    File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
      BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
    File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
      logging.FileHandler.__init__(self, filename, mode, encoding, delay)
    File "/usr/lib/python2.7/logging/__init__.py", line 901, in __init__
      StreamHandler.__init__(self, self._open())
    File "/usr/lib/python2.7/logging/__init__.py", line 924, in _open
      stream = open(self.baseFilename, self.mode)
  IOError: [Errno 2] No such file or directory: '/var/log/app_engine/app.log.json'
  </code></pre>
  
  <p>But now I get the following error:</p>
  
  <pre><code>sudo docker run -ti gcr.io/MY-PROJECT/ae-image /app/app.yaml
  LOG 1 1433422040537094 Using module_yaml_path from argv: /app/app.yaml
  Traceback (most recent call last):
    File "/home/vmagent/python_vm_runtime/vmboot.py", line 133, in &lt;module&gt;
      run_file(__file__, globals())
    File "/home/vmagent/python_vm_runtime/vmboot.py", line 129, in run_file
      execfile(_PATHS.script_file(script_name), globals_)
    File "/home/vmagent/python_vm_runtime/google/appengine/tools/vmboot.py", line 65, in &lt;module&gt;
      main()
    File "/home/vmagent/python_vm_runtime/google/appengine/tools/vmboot.py", line 61, in main
      vmservice.CreateAndRunService(module_yaml_path)
    File "/home/vmagent/python_vm_runtime/google/appengine/ext/vmruntime/vmservice.py", line 154, in CreateAndRunService
      service.CreateServer()
    File "/home/vmagent/python_vm_runtime/google/appengine/ext/vmruntime/vmservice.py", line 126, in CreateServer
      appengine_config = vmconfig.BuildVmAppengineEnvConfig()
    File "/home/vmagent/python_vm_runtime/google/appengine/ext/vmruntime/vmconfig.py", line 60, in BuildVmAppengineEnvConfig
      _MetadataGetter('gae_backend_instance'))
    File "/home/vmagent/python_vm_runtime/google/appengine/ext/vmruntime/vmconfig.py", line 37, in _MetadataGetter
      return urllib2.urlopen(req).read()
    File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
      return _opener.open(url, data, timeout)
    File "/usr/lib/python2.7/urllib2.py", line 407, in open
      response = meth(req, response)
    File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
      'http', request, response, code, msg, hdrs)
    File "/usr/lib/python2.7/urllib2.py", line 445, in error
      return self._call_chain(*args)
    File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
      result = func(*args)
    File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
      raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 404: Not Found
  </code></pre>
  
  <p>What kind of configuration or actions can I do so that I can run this docker image inside of docker like:</p>
  
  <pre><code>sudo docker run gcr.io/MY-PROJECT/ae-image
  </code></pre>
  
  <p>Another option for me would be to run AE in python but I don't know how I can tell it to use the production datastore (GCD). I suppose that that is the problem I'm having with the docker implementation above. </p>