Fix Docker image and helm issue
[pti/o2.git] / Dockerfile
1 FROM python:3.10-slim-buster
2
3 RUN apt-get update && apt-get install -y git gcc procps vim curl ssh
4
5 # in case git repo is not accessable
6 # RUN mkdir -p /cgtsclient
7 # COPY temp/config /cgtsclient/
8 RUN git clone --depth 1 --branch master https://opendev.org/starlingx/config.git /cgtsclient
9 RUN pip install -e /cgtsclient/sysinv/cgts-client/cgts-client/
10
11 # RUN mkdir -p /distcloud-client
12 # COPY temp/distcloud-client /distcloud-client/
13 RUN git clone --depth 1 --branch master https://opendev.org/starlingx/distcloud-client.git /distcloud-client/
14 RUN pip install -e /distcloud-client/distributedcloud-client
15 # in case git repo is not accessable
16
17 # RUN git clone --depth 1 --branch master https://github.com/cloudify-incubator/cloudify-helm-plugin.git /helmsdk
18 RUN git clone --depth 1 --branch master https://opendev.org/starlingx/fault.git /faultclient
19 RUN pip install -e /faultclient/python-fmclient/fmclient/
20
21
22 COPY requirements.txt /tmp/
23 COPY requirements-stx.txt /tmp/
24 COPY constraints.txt /tmp/
25
26 RUN  pip install -r /tmp/requirements.txt -c /tmp/constraints.txt
27
28 # RUN  pip install -r /tmp/requirements-stx.txt
29
30 COPY requirements-test.txt /tmp/
31 RUN pip install -r /tmp/requirements-test.txt
32
33
34 RUN mkdir -p /src
35 COPY o2ims/ /src/o2ims/
36 COPY o2dms/ /src/o2dms/
37 COPY o2common/ /src/o2common/
38
39 RUN mkdir -p /src/helm_sdk/
40 COPY helm_sdk/ /src/helm_sdk/
41
42 RUN mkdir -p /configs/
43 COPY configs/ /configs/
44
45 RUN mkdir -p /src/o2app/
46 COPY o2app/ /src/o2app/
47 COPY setup.py /src/
48
49 RUN pip install -e /src
50
51 COPY configs/ /etc/o2/
52
53 COPY tests/ /tests/
54
55 RUN curl -O https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz;
56 RUN tar -zxvf helm-v3.3.1-linux-amd64.tar.gz; cp linux-amd64/helm /usr/local/bin
57
58 WORKDIR /src