blob: f1c1c261ed5dc1f2bab56d161c8dbb9d92f78211 [file] [log] [blame]
FROM ubuntu:14.04.3
# XXX Workaround for docker bug:
# https://github.com/docker/docker/issues/6345
# Kernel 3.15 breaks docker, uss the line below as a workaround
# until there is a fix
RUN ln -s -f /bin/true /usr/bin/chfn
# XXX End workaround
# Install.
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \
curl \
gcc \
geoip-database \
git \
graphviz \
graphviz-dev \
libgeoip1 \
libxslt1.1 \
libxslt1-dev \
libyaml-dev \
m4 \
pkg-config \
python-dev \
python-httplib2 \
python-pip \
python-psycopg2 \
python-pycurl \
python-setuptools \
tar \
wget \
##### observer dependencies
python-keystoneclient \
python-novaclient \
python-neutronclient \
python-glanceclient \
python-ceilometerclient \
openvpn
RUN pip install \
django==1.7 \
django-bitfield \
django-crispy-forms \
django-encrypted-fields \
django-extensions \
django-filter==0.11.0 \
django-geoposition \
django-ipware \
django_rest_swagger \
django-suit==0.3a1 \
django-timezones \
djangorestframework==2.4.4 \
dnslib \
lxml \
markdown \
netaddr \
pyOpenSSL \
psycopg2 \
python-ceilometerclient \
python-dateutil \
python-keyczar \
pygraphviz \
pytz \
pyyaml \
requests
RUN easy_install --upgrade httplib2
RUN easy_install \
python_gflags \
google_api_python_client \
httplib2.ca_certs_locater
ADD http://code.jquery.com/jquery-1.9.1.min.js /usr/local/lib/python2.7/dist-packages/suit/static/suit/js/
# Install XOS
ADD xos /opt/xos
RUN chmod +x /opt/xos/tools/xos-manage
RUN /opt/xos/tools/xos-manage genkeys
# install Tosca engine
RUN chmod +x /opt/xos/tosca/run.py
RUN bash /opt/xos/tosca/install_tosca.sh
EXPOSE 8000
# Set environment variables.
ENV HOME /root
# Define working directory.
WORKDIR /opt/xos
# Define default command.
CMD update-ca-certificates && python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
# for OpenVPN
RUN mkdir -p /opt/openvpn
RUN chmod 777 /opt/openvpn
RUN git clone https://github.com/OpenVPN/easy-rsa.git /opt/openvpn
RUN git -C /opt/openvpn pull origin master
RUN echo 'set_var EASYRSA "/opt/openvpn/easyrsa3"' | tee /opt/openvpn/init_vars
RUN echo 'set_var EASYRSA_PKI "/opt/openvpn/init_pki"' | tee -a /opt/openvpn/init_vars
RUN echo 'set_var EASYRSA_BATCH "true"' | tee -a /opt/openvpn/init_vars
RUN /opt/openvpn/easyrsa3/easyrsa --vars=/opt/openvpn/init_vars init-pki
RUN /opt/openvpn/easyrsa3/easyrsa --vars=/opt/openvpn/init_vars gen-dh
RUN chmod 777 /opt/openvpn/init_pki/dh.pem