blob: 9e69cac51642312c27e18de3073ef82818c1a20a [file] [log] [blame]
Tony Mack69c593c2015-12-16 17:09:13 +00001FROM python:2.7.11
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 \
Tony Mack8f8b9622015-10-30 18:07:42 +000045 django-filter \
46 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 \
51 djangorestframework==2.4.4 \
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 \
Tony Mack33a360c2015-10-30 21:59:04 +000061 pygraphviz \
Tony Mack8f8b9622015-10-30 18:07:42 +000062 pytz \
63 pyyaml \
64 requests
Tony Mack9b910ae2015-10-30 15:22:20 +000065
Tony Mack69c593c2015-12-16 17:09:13 +000066RUN easy_install --upgrade httplib2
67
68RUN easy_install \
Tony Mack69c593c2015-12-16 17:09:13 +000069 python_gflags \
70 google_api_python_client \
71 httplib2.ca_certs_locater
72
Andy Bavierf74a26f2016-01-04 10:06:29 -050073ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/site-packages/suit/static/suit/js/
74
Tony Mack33a360c2015-10-30 21:59:04 +000075# Install XOS
Tony Mack8d42f972015-10-31 19:06:58 +000076RUN 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 Mack8f8b9622015-10-30 18:07:42 +000080
Tony Mack33a360c2015-10-30 21:59:04 +000081# install Tosca engine
Tony Macke30ebd82015-12-16 18:13:00 +000082RUN chmod +x /opt/xos/tosca/run.py
Tony Mack33a360c2015-10-30 21:59:04 +000083RUN bash /opt/xos/tosca/install_tosca.sh
Tony Mack8f8b9622015-10-30 18:07:42 +000084
Tony Mack8f8b9622015-10-30 18:07:42 +000085EXPOSE 8000
86
87# Set environment variables.
88ENV HOME /root
89
90# Define working directory.
Tony Mack69c593c2015-12-16 17:09:13 +000091WORKDIR /opt/xos
Tony Mack8f8b9622015-10-30 18:07:42 +000092
93# Define default command.
Tony Mack80ed9e82015-12-16 17:40:00 +000094CMD update-ca-certificates && python manage.py runserver 0.0.0.0:8000 --insecure