title: How to install pip packages with Dockerfile? Getting permission restrictions error
body: <p>I have the following Dockerfile that I use to deploy an Rasa Bot app on Google's App Engine:</p>
  
  <pre><code>FROM rasa/rasa
  ENV BOT_ENV=development
  COPY . /var/www
  WORKDIR /var/www
  RUN pip install rasa phonenumbers pgeocode
  #ENTRYPOINT ["rasa", "run", "-vv", "--enable-api", "actions"]
  ENTRYPOINT ["rasa", "run", "-vv", "--enable-api", "--endpoints", "endpoints.yml", "--credentials", "credentials.yml", "-p", "8080"]
  </code></pre>
  
  <p>But the deployment fails to install the <code>phonenumbers</code> and <code>pgeocode</code> packages, somehow doesn't have problem with rasa.</p>
  
  <p>The error I get is this:</p>
  
  <pre><code>ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/build/lib/python3.6/site-packages/phonenumbers'
  Consider using the `--user` option or check the permissions.
  
  The command '/bin/sh -c pip install rasa phonenumbers pgeocode' returned a non-zero code: 1
  ERROR
  ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
  </code></pre>
  
  <p>I have tried using the <code>--user</code> as suggested, and in some other questions I saw answers suggesting using <code>sudo</code> with <code>-H</code> flag, but that as well fails, with a different error saying that <code>sudo</code> is not recognized.</p>
  
  <p>If I remove those 2 failing packages, my app runs, except that it can't perform some actions for which those packages are needed.</p>
  
  <p>Any idea how I can solve this?</p>
  
  <p>Thanks!</p>