Bug 2327 fix to verify ipaddress in sol003_02 testsuite
[osm/tests.git] / docker / Dockerfile
1 # Copyright 2020 ETSI
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 ########################################################################
17
18 FROM ubuntu:20.04 as FINAL
19
20 RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
21     DEBIAN_FRONTEND=noninteractive apt-get --yes install \
22     gcc=4:9.3.* \
23     python3=3.8.* \
24     python3-dev=3.8.* \
25     python3-pip=20.0.2* \
26     python3-setuptools=45.2.* \
27     curl=7.68.*
28
29 RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
30     DEBIAN_FRONTEND=noninteractive apt-get --yes install \
31     gettext-base=0.19.* \
32     git=1:2.25.* \
33     iputils-ping=3:* \
34     jq=1.6* \
35     libcurl4-openssl-dev=7.68.* \
36     libssl-dev=1.1.*
37
38 ##### Different from devops/docker/tests/Dockerfile
39 RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
40     DEBIAN_FRONTEND=noninteractive apt-get --yes install \
41     software-properties-common apt-transport-https
42
43 ARG OSM_REPOSITORY="deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/testing-daily testing IM osmclient"
44 RUN curl -q -o OSM-ETSI-Release-key.gpg "https://osm-download.etsi.org/repository/osm/debian/testing-daily/OSM%20ETSI%20Release%20Key.gpg" && \
45     APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add OSM-ETSI-Release-key.gpg && \
46     DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$OSM_REPOSITORY" && \
47     DEBIAN_FRONTEND=noninteractive apt-get -y update && \
48     apt-get install python3-osm-im python3-osmclient
49
50 RUN pip3 install \
51     -r /usr/lib/python3/dist-packages/osm_im/requirements.txt \
52     -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
53
54 COPY robot-systest /robot-systest
55 COPY charm.sh /usr/sbin/charm
56 COPY requirements.txt /robot-systest
57
58 RUN pip3 install \
59     -r /robot-systest/requirements.txt
60 ###################################################
61
62 ARG CACHE_DATE=not_a_date
63 RUN git clone \
64     https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git \
65     --recurse-submodules \
66     /robot-systest/osm-packages
67
68 WORKDIR /robot-systest
69
70 # Folder where Robot tests are stored
71 ENV ROBOT_DEVOPS_FOLDER=/robot-systest
72
73 # Folder to save alternative DUT environments (optional)
74 ENV ENVIRONMENTS_FOLDER=environments
75
76 # Folder where all required packages are stored
77 ENV PACKAGES_FOLDER=/robot-systest/osm-packages
78
79 # Folder where test results should be exported
80 ENV ROBOT_REPORT_FOLDER=/robot-systest/results
81
82 # Kubeconfig file
83 ENV K8S_CREDENTIALS=/root/.kube/config
84
85 # OSM RSA file
86 ENV OSM_RSA_FILE=/root/osm_id_rsa
87
88 ENV LC_ALL=C.UTF-8
89 ENV LANG=C.UTF-8
90
91 ENTRYPOINT [ "/robot-systest/run_test.sh"]