blob: 6c84ba54561f81ddf84279836f1de407fd9338fa [file] [log] [blame]
Matteo Scandolo48d3d2d2017-08-08 13:05:27 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
A R Karthicke3bde962016-09-27 15:06:35 -070017FROM xosproject/xos-base
18
19ARG XOS_GIT_COMMIT_HASH=unknown
20ARG XOS_GIT_COMMIT_DATE=unknown
21
22LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
23LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
24
25# Include certificates from Openstack
26ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
27RUN update-ca-certificates
28
29# Install XOS
30ADD xos /opt/xos
31
32# ng-xos-lib download
33ENV NG_XOS_LIB_URL https://github.com/opencord/ng-xos-lib.git
34ENV NG_XOS_LIB_VERSION 1.0.0
35
36RUN git clone $NG_XOS_LIB_URL /tmp/ng-xos-lib \
37 && cd /tmp/ng-xos-lib \
38 && git checkout tags/$NG_XOS_LIB_VERSION \
39 && cp /tmp/ng-xos-lib/dist/ngXosHelpers.min.js /opt/xos/core/xoslib/static/vendor/ \
40 && cp /tmp/ng-xos-lib/dist/ngXosVendor.min.js /opt/xos/core/xoslib/static/vendor/
41
42RUN chmod +x /opt/xos/tools/xos-manage \
43 && sync \
44 && /opt/xos/tools/xos-manage genkeys
45
46EXPOSE 8000
47
48# Set environment variables
49ENV HOME /root
50
51# Define working directory
52WORKDIR /opt/xos
53
54# Define default command
55CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
56