Pingping Lin | b7a7d2b | 2016-08-19 18:11:36 +0000 | [diff] [blame^] | 1 | FROM ubuntu:14.04.3 |
| 2 | |
| 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. |
| 11 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ |
| 12 | curl \ |
| 13 | gcc \ |
| 14 | geoip-database \ |
| 15 | git \ |
| 16 | graphviz \ |
| 17 | graphviz-dev \ |
| 18 | libgeoip1 \ |
| 19 | libxslt1.1 \ |
| 20 | libxslt1-dev \ |
| 21 | libyaml-dev \ |
| 22 | m4 \ |
| 23 | pkg-config \ |
| 24 | python-dev \ |
| 25 | python-httplib2 \ |
| 26 | python-pip \ |
| 27 | python-psycopg2 \ |
| 28 | python-pycurl \ |
| 29 | python-setuptools \ |
| 30 | tar \ |
| 31 | wget \ |
| 32 | ##### observer dependencies |
| 33 | python-keystoneclient \ |
| 34 | python-novaclient \ |
| 35 | python-neutronclient \ |
| 36 | python-glanceclient \ |
| 37 | python-ceilometerclient |
| 38 | |
| 39 | RUN pip install \ |
| 40 | django==1.7 \ |
| 41 | django-bitfield \ |
| 42 | django-crispy-forms \ |
| 43 | django-encrypted-fields \ |
| 44 | django-extensions \ |
| 45 | django-filter==0.11.0 \ |
| 46 | django-geoposition \ |
| 47 | django-ipware \ |
| 48 | django_rest_swagger \ |
| 49 | django-suit==0.3a1 \ |
| 50 | django-timezones \ |
| 51 | djangorestframework==2.4.4 \ |
| 52 | dnslib \ |
| 53 | lxml \ |
| 54 | markdown \ |
| 55 | netaddr \ |
| 56 | pyOpenSSL \ |
| 57 | psycopg2 \ |
| 58 | python-ceilometerclient \ |
| 59 | python-dateutil \ |
| 60 | python-keyczar \ |
| 61 | pygraphviz \ |
| 62 | pytz \ |
| 63 | pyyaml \ |
| 64 | requests |
| 65 | |
| 66 | RUN easy_install --upgrade httplib2 |
| 67 | |
| 68 | RUN easy_install \ |
| 69 | python_gflags \ |
| 70 | google_api_python_client \ |
| 71 | httplib2.ca_certs_locater |
| 72 | |
| 73 | ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/ |
| 74 | |
| 75 | # Install XOS |
| 76 | RUN git clone git://github.com/open-cloud/xos.git /tmp/xos && \ |
| 77 | mv /tmp/xos/xos /opt/ && \ |
| 78 | chmod +x /opt/xos/tools/xos-manage && \ |
| 79 | /opt/xos/tools/xos-manage genkeys |
| 80 | |
| 81 | # install Tosca engine |
| 82 | RUN chmod +x /opt/xos/tosca/run.py |
| 83 | RUN bash /opt/xos/tosca/install_tosca.sh |
| 84 | |
| 85 | EXPOSE 8000 |
| 86 | |
| 87 | # Set environment variables. |
| 88 | ENV HOME /root |
| 89 | |
| 90 | # Define working directory. |
| 91 | WORKDIR /opt/xos |
| 92 | |
| 93 | # Define default command. |
| 94 | CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations |