blob: 37131c5c9e8fe67b54059d423db74c3f4cd574fd [file] [log] [blame]
Scott Bakeracb2bf62019-03-15 10:20:35 -07001# Copyright 2018-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
Scott Baker5969fc82019-03-27 12:14:09 -070015# docker build -t smbaker/testservice-synchronizer:test -f Dockerfile.synchronizer ..
Scott Bakeracb2bf62019-03-15 10:20:35 -070016
17# xosproject/testservice
18
Scott Baker5969fc82019-03-27 12:14:09 -070019FROM xosproject/alpine-grpc-base:0.9.0
Scott Bakeracb2bf62019-03-15 10:20:35 -070020
Scott Baker5969fc82019-03-27 12:14:09 -070021# Add libraries
22COPY lib /opt/xos/lib
23COPY VERSION /opt/xos
24
25# Install non-xos pip packages
26COPY testservice/requirements.txt /tmp/requirements.txt
27RUN pip install -r /tmp/requirements.txt \
28 && pip freeze > /var/xos/pip_freeze_requirements_`date -u +%Y%m%dT%H%M%S`
29
30# Install xos packages using pip so their dependencies are installed
31RUN pip install -e /opt/xos/lib/xos-config \
32 && pip install -e /opt/xos/lib/xos-genx \
33 && pip install -e /opt/xos/lib/xos-kafka \
34 && pip install -e /opt/xos/lib/xos-api \
35 && pip install -e /opt/xos/lib/xos-synchronizer \
36 && pip freeze > /var/xos/pip_freeze_libraries_`date -u +%Y%m%dT%H%M%S`
37
38# Install the synchronizer
39COPY testservice/xos/synchronizer /opt/xos/synchronizers/testservice
Scott Bakeracb2bf62019-03-15 10:20:35 -070040
41ENTRYPOINT []
42
43WORKDIR "/opt/xos/synchronizers/testservice"
44
45# Label image
46ARG org_label_schema_schema_version=1.0
47ARG org_label_schema_name=testservice
48ARG org_label_schema_version=unknown
49ARG org_label_schema_vcs_url=unknown
50ARG org_label_schema_vcs_ref=unknown
51ARG org_label_schema_build_date=unknown
52ARG org_opencord_vcs_commit_date=unknown
53ARG org_opencord_component_chameleon_version=unknown
54ARG org_opencord_component_chameleon_vcs_url=unknown
55ARG org_opencord_component_chameleon_vcs_ref=unknown
56ARG org_opencord_component_xos_version=unknown
57ARG org_opencord_component_xos_vcs_url=unknown
58ARG org_opencord_component_xos_vcs_ref=unknown
59
60LABEL org.label-schema.schema-version=$org_label_schema_schema_version \
61 org.label-schema.name=$org_label_schema_name \
62 org.label-schema.version=$org_label_schema_version \
63 org.label-schema.vcs-url=$org_label_schema_vcs_url \
64 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
65 org.label-schema.build-date=$org_label_schema_build_date \
66 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date \
67 org.opencord.component.chameleon.version=$org_opencord_component_chameleon_version \
68 org.opencord.component.chameleon.vcs-url=$org_opencord_component_chameleon_vcs_url \
69 org.opencord.component.chameleon.vcs-ref=$org_opencord_component_chameleon_vcs_ref \
70 org.opencord.component.xos.version=$org_opencord_component_xos_version \
71 org.opencord.component.xos.vcs-url=$org_opencord_component_xos_vcs_url \
72 org.opencord.component.xos.vcs-ref=$org_opencord_component_xos_vcs_ref
73
Scott Baker5969fc82019-03-27 12:14:09 -070074CMD ["/usr/bin/python", "/opt/xos/synchronizers/testservice/testservice-synchronizer.py"]
75