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.
14 FROM ubuntu:bionic-20180821
16 MAINTAINER csit-dev <csit-dev@lists.fd.io>
17 LABEL Description="CSIT vpp-device ubuntu 18.04 baseline image (x86)"
20 # Setup the environment
21 ENV DEBIAN_FRONTEND=noninteractive
22 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
23 ENV NOTVISIBLE "in users profile"
24 ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python
27 RUN apt-get -q update \
28 && apt-get install -y -qq \
31 software-properties-common \
32 && rm -rf /var/lib/apt/lists/*
35 RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
36 && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
37 && apt-get remove -y \
41 RUN apt-get -q update \
42 && apt-get install -y -qq \
64 openjdk-8-jdk-headless \
85 && rm -rf /var/lib/apt/lists/*
88 RUN locale-gen en_US.UTF-8 \
89 && dpkg-reconfigure locales
92 RUN chown root:syslog /var/log \
93 && chmod 755 /etc/default
95 # Create directory structure
96 RUN mkdir -p /tmp/dumps \
97 && mkdir -p /var/cache/vpp/python \
98 && mkdir -p /var/run/sshd
111 python-dateutil==2.4.2 \
114 robotframework==2.9.2 \
127 RUN echo 'root:Csit1234' | chpasswd \
128 && sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config \
129 && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
130 && echo "export VISIBLE=now" >> /etc/profile
134 COPY supervisord.conf /etc/supervisord/supervisord.conf
136 CMD ["sh", "-c", "rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api; /usr/bin/supervisord -c /etc/supervisord/supervisord.conf; /usr/sbin/sshd -D"]