blob: 7d3a928fb3024e8075d4ed423551fbd1be5e1ef4 [file] [log] [blame]
# syntax=docker/dockerfile:1.0.0-experimental
FROM ubuntu:20.04
LABEL maintainer="dev@mirantis.com"
LABEL build_date="2023-08-14"
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
LANG=C.UTF-8 \
LANGUAGE=$LANG \
PYTEST_REPORT_DIR=/var/lib/validation_artifacts
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
ARG UBUNTU_MIRROR_URL="http://archive.ubuntu.com/ubuntu"
ENV PYTHONHTTPSVERIFY=0
WORKDIR /var/lib/
COPY bin/ /usr/local/bin/
COPY test_set/ ./
RUN set -exo pipefail; \
pushd /etc/apt/ && echo > sources.list && \
echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages && \
echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes && \
echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends && \
echo "deb [arch=amd64] $UBUNTU_MIRROR_URL focal main restricted universe multiverse" >> sources.list && \
echo "deb [arch=amd64] $UBUNTU_MIRROR_URL focal-updates main restricted universe multiverse" >> sources.list && \
echo "deb [arch=amd64] $UBUNTU_MIRROR_URL focal-backports main restricted universe multiverse" >> sources.list && \
popd ;
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y build-essential curl git-core iputils-ping libffi-dev libldap2-dev libsasl2-dev libssl-dev patch vim-tiny wget \
python2.7 python2.7-dev python3.8 python3.8-dev python3-pip \
&& pip install --upgrade pip setuptools wheel \
&& apt-mark manual python3 python3-pip \
# tox==3.25.1 the latest version which supports python2.7 properly
# the same for virtualenv==20.21.0
&& pip install -U tox==3.25.1 virtualenv==20.15.1
RUN tox --recreate \
# Cleanup
&& apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc && \
apt-get -y autoremove; apt-get -y clean ; rm -rf /root/.cache; rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* ; rm -rf /var/tmp/* ; rm -rfv /etc/apt/sources.list.d/* ; echo > /etc/apt/sources.list \
# Download iperf package
&& wget http://ftp.br.debian.org/debian/pool/main/i/iperf/iperf_2.0.14a+dfsg1-1_amd64.deb -O /var/lib/iperf.deb
ENTRYPOINT ["entrypoint.sh"]
# docker build --no-cache -t cvp-sanity-checks:test_latest .