Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. from stackbrew/ubuntu:precise
  2. run echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
  3. run apt-get -y update
  4. # Install required packages
  5. run apt-get -y install python-cairo python-django python-twisted python-django-tagging python-simplejson python-pysqlite2 python-support python-pip gunicorn supervisor nginx-light
  6. run pip install whisper
  7. run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" carbon
  8. run pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/webapp" graphite-web
  9. # Add system service config
  10. add ./nginx.conf /etc/nginx/nginx.conf
  11. add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  12. # Add graphite config
  13. add ./initial_data.json /var/lib/graphite/webapp/graphite/initial_data.json
  14. add ./local_settings.py /var/lib/graphite/webapp/graphite/local_settings.py
  15. add ./carbon.conf /var/lib/graphite/conf/carbon.conf
  16. add ./storage-schemas.conf /var/lib/graphite/conf/storage-schemas.conf
  17. run mkdir -p /var/lib/graphite/storage/whisper
  18. run touch /var/lib/graphite/storage/graphite.db /var/lib/graphite/storage/index
  19. run chown -R www-data /var/lib/graphite/storage
  20. run chmod 0775 /var/lib/graphite/storage /var/lib/graphite/storage/whisper
  21. run chmod 0664 /var/lib/graphite/storage/graphite.db
  22. run cd /var/lib/graphite/webapp/graphite && python manage.py syncdb --noinput
  23. expose :80
  24. expose :2003
  25. cmd ["/usr/bin/supervisord"]