Remove: VIRL
[csit.git] / resources / tools / disk-image-builder / csit-sut / Dockerfile
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ubuntu:bionic-20180821
-
+FROM ubuntu:18.04
 MAINTAINER csit-dev <csit-dev@lists.fd.io>
-LABEL Description="CSIT vpp-device ubuntu 18.04 baseline image (x86)"
-LABEL Version="0.6"
+LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image"
+LABEL Version="0.7"
 
 # Setup the environment
 ENV DEBIAN_FRONTEND=noninteractive
@@ -23,31 +22,21 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
 ENV NOTVISIBLE "in users profile"
 ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python
 
-# Base layer
-RUN apt-get -q update \
- && apt-get install -y -qq \
-        apt-transport-https \
-        curl \
-        software-properties-common \
- && rm -rf /var/lib/apt/lists/*
-
-# Repository settings
-RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
- && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
- && apt-get remove -y \
-        curl
-
-# Extended layer
+# Install packages and Docker
 RUN apt-get -q update \
  && apt-get install -y -qq \
         # general tools
+        apt-transport-https \
         bridge-utils \
         cloud-init \
+        curl \
+        gdb \
         locales \
         net-tools \
         openssh-server \
         pciutils \
         rsyslog \
+        software-properties-common \
         ssh \
         sudo \
         supervisor \
@@ -57,16 +46,28 @@ RUN apt-get -q update \
         # csit requirements
         cmake \
         dkms \
-        docker-ce \
+        gfortran \
+        libblas-dev \
+        liblapack-dev \
         libpcap-dev \
-        libpython2.7-dev \
-        libpython-dev \
-        openjdk-8-jdk-headless \
-        python-pip \
-        python2.7-dev \
+        python-all \
+        python-apt \
+        python-cffi \
+        python-cffi-backend \
         python-dev \
+        python-enum34 \
+        python-pip \
+        python-setuptools \
         python-virtualenv \
-        qemu-system-x86 \
+        python3-all \
+        python3-apt \
+        python3-cffi \
+        python3-cffi-backend \
+        python3-dev \
+        python3-pip \
+        python3-setuptools \
+        python3-virtualenv \
+        qemu-system \
         socat \
         strongswan \
         unzip \
@@ -79,9 +80,12 @@ RUN apt-get -q update \
         libmbedtls10 \
         libmbedx509-0 \
         libnuma1 \
-        python-cffi \
-        python-enum34 \
-        python3-cffi \
+        sshpass \
+ && curl -L https://packagecloud.io/fdio/master/gpgkey | sudo apt-key add - \
+ && curl -s https://packagecloud.io/install/repositories/fdio/master/script.deb.sh | sudo bash \
+ # temp hack due to build.sh
+ && apt-get install -y -qq vpp-ext-deps \
+ && curl -fsSL https://get.docker.com | sh \
  && rm -rf /var/lib/apt/lists/*
 
 # Configure locales
@@ -98,30 +102,61 @@ RUN mkdir -p /tmp/dumps \
  && mkdir -p /var/run/sshd
 
 # CSIT PIP pre-cache
-RUN pip install \
-        docopt==0.6.2 \
-        ecdsa==0.13 \
-        enum34==1.1.2 \
-        ipaddress==1.0.16 \
-        paramiko==1.16.0 \
-        pexpect==4.6.0 \
+RUN pip3 install \
+        ecdsa==0.13.3 \
+        paramiko==2.6.0 \
         pycrypto==2.6.1 \
-        pykwalify==1.5.0 \
-        pypcap==1.1.5 \
-        python-dateutil==2.4.2 \
-        PyYAML==3.11 \
-        requests==2.9.1 \
-        robotframework==2.9.2 \
-        scapy==2.3.1 \
-        scp==0.10.2 \
-        six==1.12.0 \
+        pypcap==1.2.3 \
+        PyYAML==5.1.1 \
+        requests==2.22.0 \
+        robotframework==3.1.2 \
+        scapy==2.4.3 \
+        scp==0.13.2 \
+        ansible==2.7.8 \
         dill==0.2.8.2 \
-        numpy==1.14.5 \
-        scipy==1.1.0
+        numpy==1.17.3 \
+        hdrhistogram==0.6.1 \
+        pandas==0.25.3 \
+        plotly==4.1.1 \
+        PTable==0.9.2 \
+        Sphinx==2.2.1 \
+        sphinx-rtd-theme==0.4.0 \
+        sphinxcontrib-programoutput==0.15 \
+        sphinxcontrib-robotdoc==0.11.0 \
+        alabaster==0.7.12 \
+        Babel==2.7.0 \
+        bcrypt==3.1.7 \
+        certifi==2019.9.11 \
+        cffi==1.13.2 \
+        chardet==3.0.4 \
+        cryptography==2.8 \
+        docutils==0.15.2 \
+        future==0.18.2 \
+        idna==2.8 \
+        imagesize==1.1.0 \
+        Jinja2==2.10.3 \
+        MarkupSafe==1.1.1 \
+        packaging==19.2 \
+        pbr==5.4.3 \
+        pycparser==2.19 \
+        Pygments==2.4.2 \
+        PyNaCl==1.3.0 \
+        pyparsing==2.4.4 \
+        python-dateutil==2.8.1 \
+        pytz==2019.3 \
+        retrying==1.3.3 \
+        six==1.13.0 \
+        snowballstemmer==2.0.0 \
+        sphinxcontrib-applehelp==1.0.1 \
+        sphinxcontrib-devhelp==1.0.1 \
+        sphinxcontrib-htmlhelp==1.0.2 \
+        sphinxcontrib-jsmath==1.0.1 \
+        sphinxcontrib-qthelp==1.0.2 \
+        sphinxcontrib-serializinghtml==1.1.3 \
+        urllib3==1.25.6
 
-# VPP PIP pre-cache
-RUN pip install \
-        aenum
+# ARM workaround
+RUN pip3 install scipy==1.1.0
 
 # SSH settings
 RUN echo 'root:Csit1234' | chpasswd \
@@ -129,8 +164,8 @@ RUN echo 'root:Csit1234' | chpasswd \
  && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd \
  && echo "export VISIBLE=now" >> /etc/profile
 
-EXPOSE 22
+EXPOSE 2222
 
-COPY supervisord.conf /etc/supervisord/supervisord.conf
+COPY supervisord.conf /etc/supervisor/supervisord.conf
 
-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"]
+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"]