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:
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 MAINTAINER csit-dev <csit-dev@lists.fd.io>
16 LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image"
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
25 # Install packages and Docker
26 RUN apt-get -q update \
27 && apt-get install -y -qq \
39 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 # 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/*
93 RUN locale-gen en_US.UTF-8 \
94 && dpkg-reconfigure locales
97 RUN chown root:syslog /var/log \
98 && chmod 755 /etc/default
100 # Create directory structure
101 RUN mkdir -p /tmp/dumps \
102 && mkdir -p /var/cache/vpp/python \
103 && mkdir -p /var/run/sshd
113 robotframework==3.1.2 \
120 hdrhistogram==0.6.1 \
125 sphinx-rtd-theme==0.4.0 \
126 sphinxcontrib-programoutput==0.15 \
127 sphinxcontrib-robotdoc==0.11.0 \
147 python-dateutil==2.8.1 \
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 \
161 RUN pip3 install scipy==1.1.0
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
171 COPY supervisord.conf /etc/supervisor/supervisord.conf
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"]