blob: 3a5ae469c6dd886cbeabb987e0a0712c4cbaf481 [file] [log] [blame]
anjana_sreekumar@infosys.com991c2062020-01-08 11:42:57 +05301#
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
17ARG BASE_OS=ubuntu:16.04
18
19FROM $BASE_OS AS builder
20WORKDIR /openmme
21COPY install_builddeps.sh .
22RUN ./install_builddeps.sh
23
24COPY . ./
25RUN make && make install
26
27FROM $BASE_OS AS runtime
28COPY install_rundeps.sh .
29RUN bash -c "source ./install_rundeps.sh && install_run_deps && install_run_utils && cleanup_image"
30COPY --from=builder /usr/local/lib /usr/local/lib
31COPY --from=builder /tmp/grpc/libs /usr/lib/grpc
32
33WORKDIR /openmme/target
34COPY --from=builder /openmme/target .
35
36ARG org_label_schema_version=unknown
37ARG org_label_schema_vcs_url=unknown
38ARG org_label_schema_vcs_ref=unknown
39ARG org_label_schema_build_date=unknown
40ARG org_opencord_vcs_commit_date=unknown
41
42LABEL 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