blob: a99b5d775820d886f1a038a10933c48f499dfea1 [file] [log] [blame]
Zack Williams7eb36d02019-03-19 07:16:12 -07001# 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
15# xosproject/chameleon
16FROM alpine:3.9.2
17
18# Install base software
19RUN apk add --no-cache \
20 build-base \
21 libffi-dev \
22 libressl-dev \
23 py-setuptools \
24 py2-pip \
25 python2-dev \
26 && mkdir /chameleon \
27 && touch /chameleon/__init__.py \
28 && pip freeze > /chameleon/pip_freeze_apk_`date -u +%Y%m%dT%H%M%S`
29
30# Copy over code
31COPY . /chameleon/chameleon
32
33# Install modules and build the protos
34RUN pip install -r /chameleon/chameleon/requirements.txt \
35 && pip freeze > /chameleon/pip_freeze_chameleon_`date -u +%Y%m%dT%H%M%S` \
36 && make -C /chameleon/chameleon/protos
37
38# Label image
39ARG org_label_schema_version=unknown
40ARG org_label_schema_vcs_url=unknown
41ARG org_label_schema_vcs_ref=unknown
42ARG org_label_schema_build_date=unknown
43ARG org_opencord_vcs_commit_date=unknown
44
45LABEL org.label-schema.schema-version=1.0 \
46 org.label-schema.name=chameleon \
47 org.label-schema.version=$org_label_schema_version \
48 org.label-schema.vcs-url=$org_label_schema_vcs_url \
49 org.label-schema.vcs-ref=$org_label_schema_vcs_ref \
50 org.label-schema.build-date=$org_label_schema_build_date \
51 org.opencord.vcs-commit-date=$org_opencord_vcs_commit_date
52
53ENV PYTHONPATH=/chameleon
54
55# Exposing process and default entry point
56CMD ["python", "/chameleon/chameleon/main.py"]