Fix the objref issue.
[pti/o2.git] / Dockerfile
1 FROM nexus3.onap.org:10001/onap/integration-python:10.1.0
2 # https://nexus3.onap.org/#browse/search=keyword%3Dintegration-python:d406d405e4cfbf1186265b01088caf9a
3 # https://git.onap.org/integration/docker/onap-python/tree/Dockerfile
4
5 USER root
6
7 ARG user=orano2
8 ARG group=orano2
9 # Create a group and user
10 RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
11     chown -R $user:$group /home/$user &&  \
12     mkdir /var/log/$user && \
13     mkdir -p /src && \
14     mkdir -p /configs/ && \
15     mkdir -p /src/o2app/ && \
16     mkdir -p /src/helm_sdk/ && \
17     mkdir -p /etc/o2/ && \
18     chown -R $user:$group /var/log/$user && \
19     chown -R $user:$group /src && \
20     chown -R $user:$group /configs && \
21     chown -R $user:$group /etc/o2/
22
23 COPY requirements.txt /tmp/
24 COPY requirements-stx.txt /tmp/
25 COPY constraints.txt /tmp/
26
27
28 COPY o2ims/ /src/o2ims/
29 COPY o2dms/ /src/o2dms/
30 COPY o2common/ /src/o2common/
31 COPY o2app/ /src/o2app/
32 COPY setup.py /src/
33
34 COPY helm_sdk/ /src/helm_sdk/
35
36 COPY configs/ /etc/o2/
37 COPY configs/ /configs/
38
39 RUN set -ex \
40     && apk add --no-cache bash \
41         && apk add --no-cache --virtual .fetch2-deps \
42         git curl \
43     && apk add --no-cache --virtual .build2-deps  \
44                 bluez-dev \
45                 bzip2-dev \
46                 dpkg-dev dpkg \
47                 expat-dev \
48                 gcc \
49                 libc-dev \
50                 libffi-dev \
51                 libnsl-dev \
52                 libtirpc-dev \
53                 linux-headers \
54                 make \
55                 ncurses-dev \
56                 openssl-dev \
57                 pax-utils \
58                 sqlite-dev \
59                 tcl-dev \
60                 tk \
61                 tk-dev \
62                 util-linux-dev \
63                 xz-dev \
64                 zlib-dev \
65     && pip install -r /tmp/requirements.txt -r /tmp/requirements-stx.txt -c /tmp/constraints.txt \
66     && curl -O https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz; \
67         tar -zxvf helm-v3.3.1-linux-amd64.tar.gz; \
68         cp linux-amd64/helm /usr/local/bin; \
69         rm -f helm-v3.3.1-linux-amd64.tar.gz \
70     && pip install -e /src \
71     && apk del --no-network .fetch2-deps \
72     && apk del --no-network .build2-deps
73
74 # && pip install -r /tmp/requirements.txt -r /tmp/requirements-stx.txt -c /tmp/constraints.txt
75 # RUN apt-get update && apt-get install -y git gcc procps vim curl ssh
76 # && git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/config.git /cgtsclient \
77 # && git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/distcloud-client.git /distcloud-client/ \
78 # && git clone --depth 1 --branch r/stx.7.0 https://opendev.org/starlingx/fault.git /faultclient \
79 # && pip install -e /cgtsclient/sysinv/cgts-client/cgts-client \
80 # && pip install -e /distcloud-client/distributedcloud-client \
81 # && pip install -e /faultclient/python-fmclient/fmclient \
82 # && rm -rf /cgtsclient /distcloud-client /faultclient
83
84 WORKDIR /src
85
86 # USER $user