############################################################ # Dockerfile to build a Python app # Based on Ubuntu ############################################################ # Set the base image to Ubuntu FROM ubuntu:12.04 # File Author / Maintainer MAINTAINER Christian Barra RUN apt-get update RUN apt-get install -y build-essential git python python-dev python-setuptools python-pip ADD ./ /app # if you need to modify this conf (maybe your wsgi file is not in api/wsgi.py dir) you can simple curl this file # and change whatever you want and use ./uswgi.ini rather than my rawfiles url. ADD https://raw.githubusercontent.com/barrachri/dockerfiles/master/conf/uwsgi.ini /app/conf/ # run pip install RUN pip install uwsgi RUN pip install -r /app/requirements.txt # In this way you can see this dir from your host machine VOLUME /app # Port to expose EXPOSE 8080 CMD ["/usr/local/bin/uwsgi" ,"--ini" ,"/app/conf/uwsgi.ini"]