Report: Add comparison soak vs ndr
[csit.git] / resources / tools / disk-image-builder / csit-sut / Dockerfile
1 # Copyright (c) 2019 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 FROM ubuntu:18.04
15 MAINTAINER csit-dev <csit-dev@lists.fd.io>
16 LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image"
17 LABEL Version="1.0"
18
19 # Setup the environment
20 ENV DEBIAN_FRONTEND=noninteractive
21 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
22 ENV NOTVISIBLE "in users profile"
23 ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python
24
25 # Install packages and Docker
26 RUN apt-get -q update \
27  && apt-get install -y -qq \
28         # general tools
29         apt-transport-https \
30         bridge-utils \
31         cloud-init \
32         curl \
33         gdb \
34         locales \
35         net-tools \
36         openssh-server \
37         pciutils \
38         rsyslog \
39         software-properties-common \
40         ssh \
41         sudo \
42         supervisor \
43         tar \
44         vim \
45         wget \
46         # csit requirements
47         cmake \
48         dkms \
49         gfortran \
50         libblas-dev \
51         libffi-dev \
52         liblapack-dev \
53         libpcap-dev \
54         libssl-dev \
55         python-all \
56         python-apt \
57         python-cffi \
58         python-cffi-backend \
59         python-dev \
60         python-pip \
61         python-setuptools \
62         python-virtualenv \
63         python3-all \
64         python3-apt \
65         python3-cffi \
66         python3-cffi-backend \
67         python3-dev \
68         python3-pip \
69         python3-setuptools \
70         python3-virtualenv \
71         qemu-system \
72         socat \
73         strongswan \
74         unzip \
75         tcpdump \
76         zlib1g-dev \
77         # vpp requirements
78         ca-certificates \
79         libapr1 \
80         libmbedcrypto1 \
81         libmbedtls10 \
82         libmbedx509-0 \
83         libnuma1 \
84         sshpass \
85  && curl -L https://packagecloud.io/fdio/master/gpgkey | sudo apt-key add - \
86  && curl -s https://packagecloud.io/install/repositories/fdio/master/script.deb.sh | sudo bash \
87  # temp hack due to build.sh
88  && apt-get install -y -qq vpp-ext-deps \
89  && curl -fsSL https://get.docker.com | sh \
90  && rm -rf /var/lib/apt/lists/*
91
92 # Configure locales
93 RUN locale-gen en_US.UTF-8 \
94  && dpkg-reconfigure locales
95
96 # Fix permissions
97 RUN chown root:syslog /var/log \
98  && chmod 755 /etc/default
99
100 # Create directory structure
101 RUN mkdir -p /tmp/dumps \
102  && mkdir -p /var/cache/vpp/python \
103  && mkdir -p /var/run/sshd
104
105 # CSIT PIP pre-cache
106 RUN pip3 install \
107         ecdsa==0.13.3 \
108         paramiko==2.6.0 \
109         pycrypto==2.6.1 \
110         pypcap==1.2.3 \
111         PyYAML==5.1.1 \
112         requests==2.22.0 \
113         robotframework==3.1.2 \
114         scapy==2.4.3 \
115         scp==0.13.2 \
116         ansible==2.7.8 \
117         ply==3.11 \
118         dill==0.2.8.2 \
119         numpy==1.17.3 \
120         hdrhistogram==0.6.1 \
121         pandas==0.25.3 \
122         plotly==4.1.1 \
123         PTable==0.9.2 \
124         Sphinx==2.2.1 \
125         sphinx-rtd-theme==0.4.0 \
126         sphinxcontrib-programoutput==0.15 \
127         sphinxcontrib-robotdoc==0.11.0 \
128         alabaster==0.7.12 \
129         Babel==2.7.0 \
130         bcrypt==3.1.7 \
131         certifi==2019.9.11 \
132         cffi==1.13.2 \
133         chardet==3.0.4 \
134         cryptography==2.8 \
135         docutils==0.15.2 \
136         future==0.18.2 \
137         idna==2.8 \
138         imagesize==1.1.0 \
139         Jinja2==2.10.3 \
140         MarkupSafe==1.1.1 \
141         packaging==19.2 \
142         pbr==5.4.3 \
143         pycparser==2.19 \
144         Pygments==2.4.2 \
145         PyNaCl==1.3.0 \
146         pyparsing==2.4.4 \
147         python-dateutil==2.8.1 \
148         pytz==2019.3 \
149         retrying==1.3.3 \
150         six==1.13.0 \
151         snowballstemmer==2.0.0 \
152         sphinxcontrib-applehelp==1.0.1 \
153         sphinxcontrib-devhelp==1.0.1 \
154         sphinxcontrib-htmlhelp==1.0.2 \
155         sphinxcontrib-jsmath==1.0.1 \
156         sphinxcontrib-qthelp==1.0.2 \
157         sphinxcontrib-serializinghtml==1.1.3 \
158         urllib3==1.25.6
159
160 # ARM workaround
161 RUN pip3 install scipy==1.1.0
162
163 # SSH settings
164 RUN echo 'root:Csit1234' | chpasswd \
165  && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
166  && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
167  && echo "export VISIBLE=now" >> /etc/profile
168
169 EXPOSE 2222
170
171 COPY supervisord.conf /etc/supervisor/supervisord.conf
172
173 CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisor/supervisord.conf; /usr/sbin/sshd -D -p 2222"]