blob: aebd6d592e888916f885c2b19de85ae52546c9dd [file] [log] [blame]
Zack Williams6bb2cfe2019-03-27 15:01:45 -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.
Matteo Scandolo1fedfae2017-10-09 13:57:00 -070014
Matteo Scandolo9ce18252017-06-22 10:48:25 -070015# xosproject/xos-tosca
Scott Baker08a1c082019-03-07 16:16:04 -080016
Zack Williams6bb2cfe2019-03-27 15:01:45 -070017FROM xosproject/alpine-grpc-base:0.9.0
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070018
19# Set environment variables
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070020ENV CODE_DEST /opt/xos-tosca
21WORKDIR ${CODE_DEST}
22
23# Add XOS-TOSCA code
Zack Williams6bb2cfe2019-03-27 15:01:45 -070024COPY . ${CODE_DEST}/
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070025
Zack Williams6bb2cfe2019-03-27 15:01:45 -070026# Install python packages with pip
27COPY requirements.txt /tmp/requirements.txt
28RUN pip install -r /tmp/requirements.txt \
29 && pip freeze > /var/xos/pip_freeze_xos-tosca_`date -u +%Y%m%dT%H%M%S`
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070030
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070031# Label image
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070032ARG org_label_schema_version=unknown
33ARG org_label_schema_vcs_url=unknown
34ARG org_label_schema_vcs_ref=unknown
35ARG org_label_schema_build_date=unknown
36ARG org_opencord_vcs_commit_date=unknown
37
Zack Williams6bb2cfe2019-03-27 15:01:45 -070038
39LABEL org.label-schema.schema-version=1.0 \
40 org.label-schema.name=xos-tosca \
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070041 org.label-schema.version=$org_label_schema_version \
42 org.label-schema.vcs-url=$org_label_schema_vcs_url \
43 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
44 org.label-schema.build-date=$org_label_schema_build_date \
Zack Williams6bb2cfe2019-03-27 15:01:45 -070045 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
46
47EXPOSE 9102
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070048
Zack Williamsdcf43d02017-07-17 17:16:35 -070049ENTRYPOINT [ "/usr/bin/python", "src/main.py" ]
50