blob: afc7c9d941ad614f393717dd2a3dcbc49d4a532b [file] [log] [blame]
Andy Bavier0ef747a2016-01-28 12:59:07 -05001FROM ubuntu:14.04.3
Tony Mack7c162e72015-10-30 15:22:20 +00002
Tony Mackfa320442015-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 Mack70b05da2015-10-31 18:34:35 +000011RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
Tony Macka06f1a92015-10-30 21:59:04 +000012 curl \
13 gcc \
14 geoip-database \
Tony Mack7c162e72015-10-30 15:22:20 +000015 git \
16 graphviz \
17 graphviz-dev \
Tony Macka06f1a92015-10-30 21:59:04 +000018 libgeoip1 \
Tony Mack7c162e72015-10-30 15:22:20 +000019 libxslt1.1 \
20 libxslt1-dev \
21 libyaml-dev \
Tony Macka06f1a92015-10-30 21:59:04 +000022 m4 \
Tony Mack7c162e72015-10-30 15:22:20 +000023 pkg-config \
Tony Macka06f1a92015-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 Bavierf803fe32015-12-22 15:01:51 -050032##### observer dependencies
Tony Macka06f1a92015-10-30 21:59:04 +000033 python-keystoneclient \
34 python-novaclient \
35 python-neutronclient \
36 python-glanceclient \
37 python-ceilometerclient
Tony Mack7c162e72015-10-30 15:22:20 +000038
Tony Mackc1a59d82015-12-16 17:09:13 +000039RUN pip install \
Tony Mackfa320442015-10-30 18:07:42 +000040 django==1.7 \
41 django-bitfield \
42 django-crispy-forms \
43 django-encrypted-fields \
Tony Macka06f1a92015-10-30 21:59:04 +000044 django-extensions \
Andy Bavier92e548d2016-01-08 10:42:00 -050045 django-filter==0.11.0 \
Tony Mackfa320442015-10-30 18:07:42 +000046 django-geoposition \
47 django-ipware \
48 django_rest_swagger \
David K. Bainbridgef25c0392015-12-09 09:55:59 -080049 django-suit==0.3a1 \
Tony Mackfa320442015-10-30 18:07:42 +000050 django-timezones \
Scott Baker07867702016-03-28 10:07:46 -070051 djangorestframework==3.3.3 \
Tony Macka06f1a92015-10-30 21:59:04 +000052 dnslib \
Andy Bavier70b63782016-04-25 14:38:24 -040053 jinja2 \
Andy Bavierf803fe32015-12-22 15:01:51 -050054 lxml \
Tony Mackfa320442015-10-30 18:07:42 +000055 markdown \
56 netaddr \
Tony Mackc1a59d82015-12-16 17:09:13 +000057 pyOpenSSL \
Andy Bavierf803fe32015-12-22 15:01:51 -050058 psycopg2 \
Tony Mackc1a59d82015-12-16 17:09:13 +000059 python-ceilometerclient \
Tony Mackfa320442015-10-30 18:07:42 +000060 python-dateutil \
61 python-keyczar \
Andy Bavier42dabe02016-04-06 14:23:02 -040062 python-logstash \
Tony Macka06f1a92015-10-30 21:59:04 +000063 pygraphviz \
Tony Mackfa320442015-10-30 18:07:42 +000064 pytz \
65 pyyaml \
66 requests
Tony Mack7c162e72015-10-30 15:22:20 +000067
Tony Mackc1a59d82015-12-16 17:09:13 +000068RUN easy_install --upgrade httplib2
69
70RUN easy_install \
Tony Mackc1a59d82015-12-16 17:09:13 +000071 python_gflags \
72 google_api_python_client \
73 httplib2.ca_certs_locater
74
Andy Bavier0ef747a2016-01-28 12:59:07 -050075ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
Andy Bavier4d096312016-01-04 10:06:29 -050076
Tony Macka06f1a92015-10-30 21:59:04 +000077# Install XOS
Tony Mackd7fafe62015-10-31 19:06:58 +000078RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \
79 mv /tmp/xos/xos /opt/ && \
Scott Baker0e1a0562016-01-14 09:38:34 -080080 chmod +x /opt/xos/tools/xos-manage && \
81 /opt/xos/tools/xos-manage genkeys
Tony Mackfa320442015-10-30 18:07:42 +000082
Tony Macka06f1a92015-10-30 21:59:04 +000083# install Tosca engine
Tony Mack6a742ec2015-12-16 18:13:00 +000084RUN chmod +x /opt/xos/tosca/run.py
Tony Macka06f1a92015-10-30 21:59:04 +000085RUN bash /opt/xos/tosca/install_tosca.sh
Tony Mackfa320442015-10-30 18:07:42 +000086
Tony Mackfa320442015-10-30 18:07:42 +000087EXPOSE 8000
88
89# Set environment variables.
90ENV HOME /root
91
92# Define working directory.
Tony Mackc1a59d82015-12-16 17:09:13 +000093WORKDIR /opt/xos
Tony Mackfa320442015-10-30 18:07:42 +000094
95# Define default command.
Andy Bavier0ef747a2016-01-28 12:59:07 -050096CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations