blob: e199425d4020754223a7a4ef676f1f5070a1e595 [file] [log] [blame]
Zack Williams6f54b162016-04-19 15:53:54 -07001FROM ubuntu:14.04.4
Tony Mack9b910ae2015-10-30 15:22:20 +00002
Tony Mack8f8b9622015-10-30 18:07:42 +00003# 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
7RUN ln -s -f /bin/true /usr/bin/chfn
8# XXX End workaround
9
10# Install.
Tony Mack2998d962015-10-31 18:34:35 +000011RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
Tony Mack33a360c2015-10-30 21:59:04 +000012 curl \
13 gcc \
14 geoip-database \
Tony Mack9b910ae2015-10-30 15:22:20 +000015 git \
16 graphviz \
17 graphviz-dev \
Tony Mack33a360c2015-10-30 21:59:04 +000018 libgeoip1 \
Tony Mack9b910ae2015-10-30 15:22:20 +000019 libxslt1.1 \
20 libxslt1-dev \
21 libyaml-dev \
Tony Mack33a360c2015-10-30 21:59:04 +000022 m4 \
Tony Mack9b910ae2015-10-30 15:22:20 +000023 pkg-config \
Tony Mack33a360c2015-10-30 21:59:04 +000024 python-dev \
25 python-httplib2 \
26 python-pip \
27 python-psycopg2 \
28 python-pycurl \
29 python-setuptools \
30 tar \
31 wget \
Andy Bavierb9d98452015-12-22 15:01:51 -050032##### observer dependencies
Tony Mack33a360c2015-10-30 21:59:04 +000033 python-keystoneclient \
34 python-novaclient \
35 python-neutronclient \
36 python-glanceclient \
37 python-ceilometerclient
Tony Mack9b910ae2015-10-30 15:22:20 +000038
Tony Mack69c593c2015-12-16 17:09:13 +000039RUN pip install \
Tony Mack8f8b9622015-10-30 18:07:42 +000040 django==1.7 \
41 django-bitfield \
42 django-crispy-forms \
43 django-encrypted-fields \
Tony Mack33a360c2015-10-30 21:59:04 +000044 django-extensions \
Andy Bavierc3218b62016-01-08 10:42:00 -050045 django-filter==0.11.0 \
Tony Mack8f8b9622015-10-30 18:07:42 +000046 django-geoposition \
47 django-ipware \
48 django_rest_swagger \
David K. Bainbridgecbf7c012015-12-09 09:55:59 -080049 django-suit==0.3a1 \
Tony Mack8f8b9622015-10-30 18:07:42 +000050 django-timezones \
Scott Baker9dca6292016-03-28 10:07:46 -070051 djangorestframework==3.3.3 \
Tony Mack33a360c2015-10-30 21:59:04 +000052 dnslib \
Andy Bavierb9d98452015-12-22 15:01:51 -050053 lxml \
Tony Mack8f8b9622015-10-30 18:07:42 +000054 markdown \
55 netaddr \
Tony Mack69c593c2015-12-16 17:09:13 +000056 pyOpenSSL \
Andy Bavierb9d98452015-12-22 15:01:51 -050057 psycopg2 \
Tony Mack69c593c2015-12-16 17:09:13 +000058 python-ceilometerclient \
Tony Mack8f8b9622015-10-30 18:07:42 +000059 python-dateutil \
60 python-keyczar \
Andy Bavierb923b602016-04-06 14:23:02 -040061 python-logstash \
Tony Mack33a360c2015-10-30 21:59:04 +000062 pygraphviz \
Tony Mack8f8b9622015-10-30 18:07:42 +000063 pytz \
64 pyyaml \
65 requests
Tony Mack9b910ae2015-10-30 15:22:20 +000066
Tony Mack69c593c2015-12-16 17:09:13 +000067RUN easy_install --upgrade httplib2
68
69RUN easy_install \
Tony Mack69c593c2015-12-16 17:09:13 +000070 python_gflags \
71 google_api_python_client \
72 httplib2.ca_certs_locater
73
Andy Bavier92a1ca62016-01-28 12:59:07 -050074ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
Andy Bavierf74a26f2016-01-04 10:06:29 -050075
Tony Mack33a360c2015-10-30 21:59:04 +000076# Install XOS
Tony Mack8d42f972015-10-31 19:06:58 +000077RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \
78 mv /tmp/xos/xos /opt/ && \
Scott Bakerdc90a242016-01-14 09:38:34 -080079 chmod +x /opt/xos/tools/xos-manage && \
80 /opt/xos/tools/xos-manage genkeys
Tony Mack8f8b9622015-10-30 18:07:42 +000081
Tony Mack33a360c2015-10-30 21:59:04 +000082# install Tosca engine
Tony Macke30ebd82015-12-16 18:13:00 +000083RUN chmod +x /opt/xos/tosca/run.py
Tony Mack33a360c2015-10-30 21:59:04 +000084RUN bash /opt/xos/tosca/install_tosca.sh
Tony Mack8f8b9622015-10-30 18:07:42 +000085
Tony Mack8f8b9622015-10-30 18:07:42 +000086EXPOSE 8000
87
88# Set environment variables.
89ENV HOME /root
90
91# Define working directory.
Tony Mack69c593c2015-12-16 17:09:13 +000092WORKDIR /opt/xos
Tony Mack8f8b9622015-10-30 18:07:42 +000093
94# Define default command.
Andy Bavier92a1ca62016-01-28 12:59:07 -050095CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations