d25d1838465ca020c9a39c186b12148d3d10e88e
[dcaegen2/platform.git] / mod / onboardingapi / Dockerfile
1 # ============LICENSE_START=======================================================
2 # Copyright 2020 Deutsche Telekom. All rights reserved.
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 # ============LICENSE_END=========================================================
16 FROM nexus3.onap.org:10001/onap/integration-python:7.0.1
17
18 ENV SERVER_URL=https://git.onap.org/dcaegen2/platform/plain/mod
19 ENV PATH_COMPONENT_SPEC=/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json
20 ENV PATH_DATA_FORMAT=/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json
21 ENV PG_CONN=
22
23 COPY --chown=onap:onap . /app
24
25 USER root
26
27 RUN apk update && \
28     apk add --virtual build-deps gcc python3-dev musl-dev && \
29     apk add postgresql-dev bash && \
30     mkdir schemas && \
31     wget -O schemas/compspec.json $SERVER_URL$PATH_COMPONENT_SPEC && \
32     wget -O schemas/dataformat.json $SERVER_URL$PATH_DATA_FORMAT && \
33     pip install .
34
35 USER onap
36
37 EXPOSE 8080
38
39 CMD /app/start.sh