/
Dockerfile
36 lines (25 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM xosproject/xos-base
# Include certificates from Openstack
ADD local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
RUN update-ca-certificates
# Install and boostrap XOS and Tosca
ENV XOS_GIT_REPO https://github.com/opencord/xos.git
ENV XOS_GIT_BRANCH master
RUN git clone $XOS_GIT_REPO -b $XOS_GIT_BRANCH /tmp/xos && \
mv /tmp/xos/xos /opt/ && \
chmod +x /opt/xos/tools/xos-manage && \
/opt/xos/tools/xos-manage genkeys
# ng-xos-lib download
ENV NG_XOS_LIB_URL https://github.com/opencord/ng-xos-lib.git
ENV NG_XOS_LIB_VERSION 1.0.0
RUN git clone $NG_XOS_LIB_URL /tmp/ng-xos-lib
RUN cd /tmp/ng-xos-lib && git checkout tags/$NG_XOS_LIB_VERSION
RUN cp /tmp/ng-xos-lib/dist/ngXosHelpers.min.js /opt/xos/core/xoslib/static/vendor/
RUN cp /tmp/ng-xos-lib/dist/ngXosVendor.min.js /opt/xos/core/xoslib/static/vendor/
EXPOSE 8000
# Set environment variables
ENV HOME /root
# Define working directory
WORKDIR /opt/xos
# Define default command
CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations