Matteo Scandolo | d2044a4 | 2017-08-07 16:08:28 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Zack Williams | 9a76635 | 2019-04-09 18:08:05 -0700 | [diff] [blame] | 15 | # xosproject/xos-client |
| 16 | FROM xosproject/alpine-grpc-base:0.9.0 |
Matteo Scandolo | 97521b9 | 2017-07-12 16:24:36 -0700 | [diff] [blame] | 17 | |
| 18 | # Add libraries |
Zack Williams | 9a76635 | 2019-04-09 18:08:05 -0700 | [diff] [blame] | 19 | RUN mkdir -p /opt/xos |
Matteo Scandolo | 97521b9 | 2017-07-12 16:24:36 -0700 | [diff] [blame] | 20 | COPY lib /opt/xos/lib |
Scott Baker | bcbd4cc | 2018-03-07 13:50:21 -0800 | [diff] [blame] | 21 | COPY VERSION /opt/xos |
| 22 | |
Zack Williams | be5ee1c | 2019-03-18 15:33:07 -0700 | [diff] [blame] | 23 | # Install python using pip so their dependencies are installed |
| 24 | RUN pip install -e /opt/xos/lib/xos-util \ |
| 25 | && pip install -e /opt/xos/lib/xos-config \ |
Zack Williams | 1e19223 | 2019-05-01 13:58:39 -0700 | [diff] [blame^] | 26 | && pip install -e /opt/xos/lib/xos-genx \ |
Zack Williams | be5ee1c | 2019-03-18 15:33:07 -0700 | [diff] [blame] | 27 | && pip install -e /opt/xos/lib/xos-api \ |
Zack Williams | 9a76635 | 2019-04-09 18:08:05 -0700 | [diff] [blame] | 28 | && pip freeze > /var/xos/pip_freeze_xos-client_`date -u +%Y%m%dT%H%M%S` |
Matteo Scandolo | 97521b9 | 2017-07-12 16:24:36 -0700 | [diff] [blame] | 29 | |
| 30 | # Label image |
Matteo Scandolo | 97521b9 | 2017-07-12 16:24:36 -0700 | [diff] [blame] | 31 | ARG org_label_schema_version=unknown |
| 32 | ARG org_label_schema_vcs_url=unknown |
| 33 | ARG org_label_schema_vcs_ref=unknown |
| 34 | ARG org_label_schema_build_date=unknown |
| 35 | ARG org_opencord_vcs_commit_date=unknown |
| 36 | |
Zack Williams | 9a76635 | 2019-04-09 18:08:05 -0700 | [diff] [blame] | 37 | LABEL org.label-schema.schema-version=1.0 \ |
| 38 | org.label-schema.name=xos-client \ |
Matteo Scandolo | 97521b9 | 2017-07-12 16:24:36 -0700 | [diff] [blame] | 39 | org.label-schema.version=$org_label_schema_version \ |
| 40 | org.label-schema.vcs-url=$org_label_schema_vcs_url \ |
| 41 | org.label-schema.vcs-ref=$org_label_schema_vcs_ref \ |
| 42 | org.label-schema.build-date=$org_label_schema_build_date \ |
Zack Williams | f1b5098 | 2018-08-26 16:35:49 -0700 | [diff] [blame] | 43 | org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date |
Zack Williams | 9a76635 | 2019-04-09 18:08:05 -0700 | [diff] [blame] | 44 | |
| 45 | CMD ["xossh"] |