-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.localtest
89 lines (74 loc) · 2.23 KB
/
Dockerfile.localtest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
FROM nexus3.onap.org:10001/onap/integration-python:12.0.0
# https://nexus3.onap.org/#browse/search=keyword%3Dintegration-python:d406d405e4cfbf1186265b01088caf9a
# https://git.onap.org/integration/docker/onap-python/tree/Dockerfile
USER root
ARG user=orano2
ARG group=orano2
# Create a group and user
RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \
chown -R $user:$group /home/$user && \
mkdir /var/log/$user && \
mkdir -p /src && \
mkdir -p /configs/ && \
mkdir -p /src/o2app/ && \
mkdir -p /src/helm_sdk/ && \
mkdir -p /etc/o2/ && \
chown -R $user:$group /var/log/$user && \
chown -R $user:$group /src && \
chown -R $user:$group /configs && \
chown -R $user:$group /etc/o2/
COPY requirements.txt requirements-test.txt requirements-stx.txt constraints.txt /tmp/
# in case git repo is not accessable
RUN mkdir -p /cgtsclient && mkdir -p /distcloud-client
COPY temp/config /cgtsclient/
COPY temp/distcloud-client /distcloud-client/
COPY temp/fault /faultclient/
COPY o2ims/ /src/o2ims/
COPY o2dms/ /src/o2dms/
COPY o2common/ /src/o2common/
COPY o2app/ /src/o2app/
COPY setup.py /src/
COPY helm_sdk/ /src/helm_sdk/
COPY configs/ /etc/o2/
COPY configs/ /configs/
RUN apk add --no-cache \
git \
curl \
bluez-dev \
bzip2-dev \
dpkg-dev dpkg \
expat-dev \
gcc \
libc-dev \
libffi-dev \
libnsl-dev \
libtirpc-dev \
linux-headers \
make \
ncurses-dev \
openssl-dev \
pax-utils \
sqlite-dev \
tcl-dev \
tk \
tk-dev \
util-linux-dev \
xz-dev \
zlib-dev
RUN set -ex \
&& apk add --no-cache bash \
&& apk add --no-cache --virtual .fetch2-deps \
&& pip install -r /tmp/requirements.txt -c /tmp/constraints.txt \
&& pip install -r /tmp/requirements-test.txt \
&& pip install -e /cgtsclient/sysinv/cgts-client/cgts-client/ \
&& pip install -e /distcloud-client/distributedcloud-client \
&& pip install -e /faultclient/python-fmclient/fmclient/ \
&& pip install -e /src \
&& apk del --no-network .fetch2-deps
COPY tests/ /tests/
RUN mkdir -p /etc/kubeconfig/
# COPY temp/kubeconfig/config /etc/kubeconfig/
RUN mkdir -p /var/log/orano2
WORKDIR /src
# USER $user
ENV PYTHONHASHSEED=0