A R Karthick | e3bde96 | 2016-09-27 15:06:35 -0700 | [diff] [blame] | 1 | FROM xosproject/xos-base |
| 2 | |
| 3 | ARG XOS_GIT_COMMIT_HASH=unknown |
| 4 | ARG XOS_GIT_COMMIT_DATE=unknown |
| 5 | |
| 6 | LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH |
| 7 | LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE |
| 8 | |
| 9 | # Include certificates from Openstack |
| 10 | ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt |
| 11 | RUN update-ca-certificates |
| 12 | |
| 13 | # Install XOS |
| 14 | ADD xos /opt/xos |
| 15 | |
| 16 | # ng-xos-lib download |
| 17 | ENV NG_XOS_LIB_URL https://github.com/opencord/ng-xos-lib.git |
| 18 | ENV NG_XOS_LIB_VERSION 1.0.0 |
| 19 | |
| 20 | RUN 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 | |
| 26 | RUN chmod +x /opt/xos/tools/xos-manage \ |
| 27 | && sync \ |
| 28 | && /opt/xos/tools/xos-manage genkeys |
| 29 | |
| 30 | EXPOSE 8000 |
| 31 | |
| 32 | # Set environment variables |
| 33 | ENV HOME /root |
| 34 | |
| 35 | # Define working directory |
| 36 | WORKDIR /opt/xos |
| 37 | |
| 38 | # Define default command |
| 39 | CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations |
| 40 | |