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