title: Have created a docker that installs nginx, python, uwsgi and django. How do I test it within a VM?
body: <p>I have created the <a href="https://github.com/simkimsia/aws-docker-django/blob/master/Dockerfile" rel="nofollow">following project</a> using docker.</p>
  
  <p>Here is the Dockerfile</p>
  
  <pre><code>############################################################
  # Purpose   : Dockerize Django App to be used in AWS EC2
  # Django    : 1.8.1
  # OS        : Ubuntu 14.04
  # WebServer : nginx
  # Database  : Postgres inside RDS
  # Python    : 2.7
  # VERSION   : 0.1
  ############################################################
  
  from ubuntu:14.04
  
  maintainer Kim Stacks, kimcity@gmail.com
  
  # make sure package repository is up to date
  # this is commented out because it clashes with install build-essential
  # run echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" &gt; /etc/apt/sources.list
  
  run apt-get update
  
  # run apt-get upgrade --force-yes -y
  
  # install python
  run apt-get install python  --force-yes -y              ## install 2.7
  run apt-get install python-setuptools --force-yes -y    ## for python2.7 or above
  run apt-get install build-essential --force-yes -y      ##
  run apt-get install python-virtualenv --force-yes -y    ## virtual env
  run apt-get install python-dev --force-yes -y       ## because ubuntu 14.04 does not have dev version of python 2
  
  
  # install nginx
  run apt-get install \
          nginx \
          --force-yes -y
  
  ## copy the nginx config files
  COPY ./nginx_configuration/common.conf      /etc/nginx/common.conf
  COPY ./nginx_configuration/fastcgi_params   /etc/nginx/fastcgi_params
  COPY ./nginx_configuration/nginx.conf       /etc/nginx/nginx.conf
  COPY ./nginx_configuration/php.conf         /etc/nginx/php.conf
  COPY ./nginx_configuration/default          /etc/nginx/sites-available/default
  COPY ./nginx_configuration/php.example      /etc/nginx/sites-available/php.example
  COPY ./nginx_configuration/django-app.conf      /etc/nginx/sites-available/django-app.conf
  
  ## copy the bash_rc over
  # COPY ./bash_files/.bash_profile           /root/.bash_profile
  
  run /etc/init.d/nginx restart
  
  
  ########################################
  ## Install Django 
  ## and associated python modules
  ########################################
  
  # Install pip
  RUN easy_install pip
  
  # Add and install Python modules
  ADD requirements.txt /src/requirements.txt
  RUN cd /src; pip install -r requirements.txt
  
  
  # Bundle app source
  ADD ./djangoapp /src
  
  ########################################
  ## Remove any unwanted packages
  ########################################
  run apt-get autoremove --force-yes -y
  </code></pre>
  
  <p>I have a VM that is Ubuntu14.04, so I ran the docker <strong>inside</strong> the guest OS.</p>
  
  <pre><code>docker build -t django18-python27-ubuntu1404 . ## build docker reponame dockerfilepath
  
  docker run -ti django18-python27-ubuntu1404 sh ## run the docker and go in
  </code></pre>
  
  <p>Once I am <strong>inside</strong> the docker, I go to <code>/src</code> and then run <code>uwsgi --ini uwsgi.ini</code></p>
  
  <p><strong>My question is how do I test the djangoapp inside <code>/src</code> of the docker container?</strong></p>
  
  <p>My host OS is Mac OS X Mavericks.</p>
  
  <p>My guest OS is Ubuntu 14.04.</p>
  
  <p>My docker is run <strong>inside</strong> the guest OS.</p>
  
  <p>Please advise.</p>