anjana_sreekumar@infosys.com | 991c206 | 2020-01-08 11:42:57 +0530 | [diff] [blame^] | 1 | # |
| 2 | # Copyright 2019-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 | |
| 17 | ARG BASE_OS=ubuntu:16.04 |
| 18 | |
| 19 | FROM $BASE_OS AS builder |
| 20 | WORKDIR /openmme |
| 21 | COPY install_builddeps.sh . |
| 22 | RUN ./install_builddeps.sh |
| 23 | |
| 24 | COPY . ./ |
| 25 | RUN make && make install |
| 26 | |
| 27 | FROM $BASE_OS AS runtime |
| 28 | COPY install_rundeps.sh . |
| 29 | RUN bash -c "source ./install_rundeps.sh && install_run_deps && install_run_utils && cleanup_image" |
| 30 | COPY --from=builder /usr/local/lib /usr/local/lib |
| 31 | COPY --from=builder /tmp/grpc/libs /usr/lib/grpc |
| 32 | |
| 33 | WORKDIR /openmme/target |
| 34 | COPY --from=builder /openmme/target . |
| 35 | |
| 36 | ARG org_label_schema_version=unknown |
| 37 | ARG org_label_schema_vcs_url=unknown |
| 38 | ARG org_label_schema_vcs_ref=unknown |
| 39 | ARG org_label_schema_build_date=unknown |
| 40 | ARG org_opencord_vcs_commit_date=unknown |
| 41 | |
| 42 | LABEL org.label-schema.schema-version=1.0 \ |
| 43 | org.label-schema.name=openmme \ |
| 44 | org.label-schema.version=$org_label_schema_version \ |
| 45 | org.label-schema.vcs-url=$org_label_schema_vcs_url \ |
| 46 | org.label-schema.vcs-ref=$org_label_schema_vcs_ref \ |
| 47 | org.label-schema.build-date=$org_label_schema_build_date \ |
| 48 | org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date |