Advertisement
ghostlines

Untitled

Jun 22nd, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. ############################################################
  2. # Dockerfile to build Python WSGI Application Containers
  3. ############################################################
  4.  
  5. # Set the base image to Ubuntu
  6. #FROM ubuntu:14.04
  7. FROM appgave_imgg:latest
  8.  
  9. # File Author / Maintainer
  10. MAINTAINER ghostlines
  11.  
  12. # Add the application resources URL
  13. #RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" >> /etc/apt/sources.list
  14.  
  15. # Update the sources list
  16. RUN apt-get update
  17.  
  18. # Install basic applications
  19. RUN apt-get install -y tar git curl vim wget dialog net-tools build-essential
  20.  
  21. # Install Python and Basic Python Tools
  22. RUN apt-get install -y python python-dev python-distribute python-pip
  23.  
  24. # Copy the application folder inside the container
  25. ADD ./keys/id_dsa /root/.ssh/id_dsa
  26. ADD ./known_hosts /root/.ssh/known_hosts
  27. RUN chmod 600 /root/.ssh/id_dsa
  28. RUN echo "IdentityFile /root/.ssh/id_dsa" >> /etc/ssh/ssh_config
  29.  
  30. RUN git config --global user.email email
  31. RUN git config --global user.name typhoon
  32.  
  33. #RUN ssh -v git@bitucket.org
  34. #RUN mkdir /opt/
  35. RUN cd /opt/appgave
  36. RUN git pull
  37. #RUN git clone git@bitbucket.org:ErnoTurner/appgave.git /opt/appgave
  38.  
  39. # Get pip to download and install requirements:
  40. RUN pip install -r /opt/appgave/requirements.txt
  41.  
  42. # Expose ports
  43. EXPOSE 5001
  44.  
  45. # Set the default directory where CMD will execute
  46. WORKDIR /opt/appgave
  47.  
  48. # Set the default command to execute
  49. # when creating a new container
  50. # i.e. using CherryPy to serve the application
  51. CMD gunicorn appgave_app:app -c gunicorn_config.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement