title: How to install AWS CLI in docker container based on image "python:2.7"
body: <p>I have a dockerfile that looks like this:</p>
  
  <pre><code>FROM python:2.7
  RUN pip install awscli --upgrade --user
  </code></pre>
  
  <p>Once the docker image is built from this dockerfile, I run it. But when I get into the container and try to run the AWS CLI, it can't find it, because it is not in the PATH environment variable:</p>
  
  <pre><code>$ docker exec -ti ec4934370e37 /bin/bash
  
  root@ec4934370e37:~# aws
  bash: aws: command not found
  
  root@ec4934370e37:/# find / -name aws
  /root/.local/bin/aws
  
  root@ec4934370e37:/# /root/.local/bin/aws --version
  aws-cli/1.15.81 Python/2.7.15 Linux/4.9.87-linuxkit-aufs botocore/1.10.80
  
  root@ec4934370e37:/# env | grep PATH
  PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  </code></pre>
  
  <p>What is the best/easiest/least-hacky way to make sure that the AWSCLI is usable by being included in the PATH variable? Can this be done from inside the dockerfile itself?</p>