1 # Copyright (c) 2020 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 18.04 SUT image"
16 LABEL Version="master"
18 # Setup the environment
19 ENV DEBIAN_FRONTEND=noninteractive
20 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
21 ENV NOTVISIBLE "in users profile"
22 ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python
24 # Install packages and Docker
25 RUN apt-get -q update \
26 && apt-get install -y -qq \
38 software-properties-common \
66 python3-cffi-backend \
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 && curl -fsSL https://get.docker.com | sh \
88 && rm -rf /var/lib/apt/lists/*
91 RUN locale-gen en_US.UTF-8 \
92 && dpkg-reconfigure locales
95 RUN chown root:syslog /var/log \
96 && chmod 755 /etc/default
98 # Create directory structure
99 RUN mkdir -p /tmp/dumps \
100 && mkdir -p /var/cache/vpp/python \
101 && mkdir -p /var/run/sshd
111 robotframework==3.1.2 \
117 hdrhistogram==0.6.1 \
121 sphinx-rtd-theme==0.4.0 \
122 sphinxcontrib-programoutput==0.15 \
123 sphinxcontrib-robotdoc==0.11.0 \
143 python-dateutil==2.8.1 \
147 snowballstemmer==2.0.0 \
148 sphinxcontrib-applehelp==1.0.1 \
149 sphinxcontrib-devhelp==1.0.1 \
150 sphinxcontrib-htmlhelp==1.0.2 \
151 sphinxcontrib-jsmath==1.0.1 \
152 sphinxcontrib-qthelp==1.0.2 \
153 sphinxcontrib-serializinghtml==1.1.3 \
162 RUN echo 'root:Csit1234' | chpasswd \
163 && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
164 && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
165 && echo "export VISIBLE=now" >> /etc/profile
169 COPY supervisord.conf /etc/supervisor/supervisord.conf
171 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"]