Matteo Scandolo | 48d3d2d | 2017-08-08 13:05:27 -0700 | [diff] [blame] | 1 | |
| 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 Karthick | e3bde96 | 2016-09-27 15:06:35 -0700 | [diff] [blame] | 17 | FROM xosproject/xos-base |
| 18 | |
| 19 | ARG XOS_GIT_COMMIT_HASH=unknown |
| 20 | ARG XOS_GIT_COMMIT_DATE=unknown |
| 21 | |
| 22 | LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH |
| 23 | LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE |
| 24 | |
| 25 | # Include certificates from Openstack |
| 26 | ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt |
| 27 | RUN update-ca-certificates |
| 28 | |
| 29 | # Install XOS |
| 30 | ADD xos /opt/xos |
| 31 | |
| 32 | # ng-xos-lib download |
| 33 | ENV NG_XOS_LIB_URL https://github.com/opencord/ng-xos-lib.git |
| 34 | ENV NG_XOS_LIB_VERSION 1.0.0 |
| 35 | |
| 36 | RUN 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 | |
| 42 | RUN chmod +x /opt/xos/tools/xos-manage \ |
| 43 | && sync \ |
| 44 | && /opt/xos/tools/xos-manage genkeys |
| 45 | |
| 46 | EXPOSE 8000 |
| 47 | |
| 48 | # Set environment variables |
| 49 | ENV HOME /root |
| 50 | |
| 51 | # Define working directory |
| 52 | WORKDIR /opt/xos |
| 53 | |
| 54 | # Define default command |
| 55 | CMD python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations |
| 56 | |