1 # Copyright (c) 2021 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 LABEL Description="CSIT vpp-device ubuntu 20.04 SUT image"
16 LABEL Version="master"
18 # Setup the environment
19 ENV DEBIAN_FRONTEND=noninteractive
22 RUN apt-get update -qq \
23 && apt-get install -y \
26 && sed -i 's/# \(en_US\.UTF-8 .*\)/\1/' /etc/locale.gen \
27 && locale-gen en_US.UTF-8 \
28 && dpkg-reconfigure --frontend=noninteractive locales \
29 && update-locale LANG=en_US.UTF-8 \
30 && TZ=Etc/UTC && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
31 && rm -r /var/lib/apt/lists/*
32 ENV LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ALL="en_US.UTF-8"
34 # Install packages and Docker
35 RUN apt-get -q update \
36 && apt-get install -y -qq \
65 python3-cffi-backend \
73 software-properties-common \
85 && curl -fsSL https://get.docker.com | sh \
86 && rm -rf /var/lib/apt/lists/*
89 RUN chown root:syslog /var/log \
90 && chmod 755 /etc/default
92 # Create directory structure
93 RUN mkdir -p /tmp/dumps \
94 && mkdir -p /var/cache/vpp/python \
95 && mkdir -p /var/run/sshd
105 robotframework==3.1.2 \
111 hdrhistogram==0.6.1 \
115 sphinx-rtd-theme==0.4.0 \
116 sphinxcontrib-programoutput==0.15 \
117 sphinxcontrib-robotdoc==0.11.0 \
138 python-dateutil==2.8.1 \
142 snowballstemmer==2.0.0 \
143 sphinxcontrib-applehelp==1.0.1 \
144 sphinxcontrib-devhelp==1.0.1 \
145 sphinxcontrib-htmlhelp==1.0.2 \
146 sphinxcontrib-jsmath==1.0.1 \
147 sphinxcontrib-qthelp==1.0.2 \
148 sphinxcontrib-serializinghtml==1.1.3 \
157 RUN echo 'root:Csit1234' | chpasswd \
158 && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
159 && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
160 && echo "export VISIBLE=now" >> /etc/profile
164 COPY supervisord.conf /etc/supervisor/supervisord.conf
166 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"]