Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 1 | FROM python:2.7.11 |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 2 | |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 3 | # XXX Workaround for docker bug: |
| 4 | # https://github.com/docker/docker/issues/6345 |
| 5 | # Kernel 3.15 breaks docker, uss the line below as a workaround |
| 6 | # until there is a fix |
| 7 | RUN ln -s -f /bin/true /usr/bin/chfn |
| 8 | # XXX End workaround |
| 9 | |
| 10 | # Install. |
Tony Mack | 2998d96 | 2015-10-31 18:34:35 +0000 | [diff] [blame] | 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 12 | curl \ |
| 13 | gcc \ |
| 14 | geoip-database \ |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 15 | git \ |
| 16 | graphviz \ |
| 17 | graphviz-dev \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 18 | libgeoip1 \ |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 19 | libxslt1.1 \ |
| 20 | libxslt1-dev \ |
| 21 | libyaml-dev \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 22 | m4 \ |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 23 | pkg-config \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 24 | python-dev \ |
| 25 | python-httplib2 \ |
| 26 | python-pip \ |
| 27 | python-psycopg2 \ |
| 28 | python-pycurl \ |
| 29 | python-setuptools \ |
| 30 | tar \ |
| 31 | wget \ |
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 32 | ##### observer dependencies |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 33 | python-keystoneclient \ |
| 34 | python-novaclient \ |
| 35 | python-neutronclient \ |
| 36 | python-glanceclient \ |
| 37 | python-ceilometerclient |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 38 | |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 39 | RUN pip install \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 40 | django==1.7 \ |
| 41 | django-bitfield \ |
| 42 | django-crispy-forms \ |
| 43 | django-encrypted-fields \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 44 | django-extensions \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 45 | django-filter \ |
| 46 | django-geoposition \ |
| 47 | django-ipware \ |
| 48 | django_rest_swagger \ |
David K. Bainbridge | cbf7c01 | 2015-12-09 09:55:59 -0800 | [diff] [blame] | 49 | django-suit==0.3a1 \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 50 | django-timezones \ |
| 51 | djangorestframework==2.4.4 \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 52 | dnslib \ |
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 53 | lxml \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 54 | markdown \ |
| 55 | netaddr \ |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 56 | pyOpenSSL \ |
Andy Bavier | b9d9845 | 2015-12-22 15:01:51 -0500 | [diff] [blame] | 57 | psycopg2 \ |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 58 | python-ceilometerclient \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 59 | python-dateutil \ |
| 60 | python-keyczar \ |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 61 | pygraphviz \ |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 62 | pytz \ |
| 63 | pyyaml \ |
| 64 | requests |
Tony Mack | 9b910ae | 2015-10-30 15:22:20 +0000 | [diff] [blame] | 65 | |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 66 | RUN easy_install --upgrade httplib2 |
| 67 | |
| 68 | RUN easy_install \ |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 69 | python_gflags \ |
| 70 | google_api_python_client \ |
| 71 | httplib2.ca_certs_locater |
| 72 | |
Andy Bavier | f74a26f | 2016-01-04 10:06:29 -0500 | [diff] [blame] | 73 | ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/site-packages/suit/static/suit/js/ |
| 74 | |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 75 | # Install XOS |
Tony Mack | 8d42f97 | 2015-10-31 19:06:58 +0000 | [diff] [blame] | 76 | RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \ |
| 77 | mv /tmp/xos/xos /opt/ && \ |
| 78 | chmod +x /opt/xos/scripts/opencloud && \ |
| 79 | /opt/xos/scripts/opencloud genkeys |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 80 | |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 81 | # install Tosca engine |
Tony Mack | e30ebd8 | 2015-12-16 18:13:00 +0000 | [diff] [blame] | 82 | RUN chmod +x /opt/xos/tosca/run.py |
Tony Mack | 33a360c | 2015-10-30 21:59:04 +0000 | [diff] [blame] | 83 | RUN bash /opt/xos/tosca/install_tosca.sh |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 84 | |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 85 | EXPOSE 8000 |
| 86 | |
| 87 | # Set environment variables. |
| 88 | ENV HOME /root |
| 89 | |
| 90 | # Define working directory. |
Tony Mack | 69c593c | 2015-12-16 17:09:13 +0000 | [diff] [blame] | 91 | WORKDIR /opt/xos |
Tony Mack | 8f8b962 | 2015-10-30 18:07:42 +0000 | [diff] [blame] | 92 | |
| 93 | # Define default command. |
Tony Mack | 80ed9e8 | 2015-12-16 17:40:00 +0000 | [diff] [blame] | 94 | CMD update-ca-certificates && python manage.py runserver 0.0.0.0:8000 --insecure |