blob: 21b44523c4970f277a5836fc5efd7df23167aab4 [file] [log] [blame]
A R Karthicke3bde962016-09-27 15:06:35 -07001FROM xosproject/xos-base
2
3ARG XOS_GIT_COMMIT_HASH=unknown
4ARG XOS_GIT_COMMIT_DATE=unknown
5
6LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
7LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
8
9# Include certificates from Openstack
10ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
11RUN update-ca-certificates
12
13# Install XOS
14ADD xos /opt/xos
15
16# ng-xos-lib download
17ENV NG_XOS_LIB_URL https://github.com/opencord/ng-xos-lib.git
18ENV NG_XOS_LIB_VERSION 1.0.0
19
20RUN git clone $NG_XOS_LIB_URL /tmp/ng-xos-lib \
21 && cd /tmp/ng-xos-lib \
22 && git checkout tags/$NG_XOS_LIB_VERSION \
23 && cp /tmp/ng-xos-lib/dist/ngXosHelpers.min.js /opt/xos/core/xoslib/static/vendor/ \
24 && cp /tmp/ng-xos-lib/dist/ngXosVendor.min.js /opt/xos/core/xoslib/static/vendor/
25
26RUN chmod +x /opt/xos/tools/xos-manage \
27 && sync \
28 && /opt/xos/tools/xos-manage genkeys
29
30EXPOSE 8000
31
32# Set environment variables
33ENV HOME /root
34
35# Define working directory
36WORKDIR /opt/xos
37
38# Define default command
39CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
40