[MOD/onboarding] Switch to v3 component spec
[dcaegen2/platform.git] / mod / onboardingapi / Dockerfile
1 # ============LICENSE_START=======================================================
2 # Copyright 2020 Deutsche Telekom. All rights reserved.
3 # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ============LICENSE_END=========================================================
17 FROM nexus3.onap.org:10001/onap/integration-python:7.0.1
18
19 ENV SERVER_URL=https://git.onap.org/dcaegen2/platform/plain/mod
20 ENV PATH_COMPONENT_SPEC=/component-json-schemas/component-specification/dcae-cli-v3/component-spec-schema.json
21 ENV PATH_DATA_FORMAT=/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
22 ENV PG_CONN=
23
24 COPY --chown=onap:onap . /app
25
26 USER root
27
28 RUN apk update && \
29     apk add --virtual build-deps gcc python3-dev musl-dev && \
30     apk add postgresql-dev bash && \
31     mkdir schemas && \
32     wget -O schemas/compspec.json $SERVER_URL$PATH_COMPONENT_SPEC && \
33     wget -O schemas/dataformat.json $SERVER_URL$PATH_DATA_FORMAT && \
34     pip install --upgrade pip && \
35     pip install .
36
37
38 USER onap
39
40 EXPOSE 8080
41
42 CMD /app/start.sh