blob: cd6b0739477f72b49e5591b5f5ab475243e7d648 [file] [log] [blame]
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -05001FROM ubuntu:16.04
2
azvyagintsevec38a1c2018-12-18 16:10:14 +02003LABEL maintainer="dev@mirantis.com"
4
5ENV DEBIAN_FRONTEND=noninteractive \
6 DEBCONF_NONINTERACTIVE_SEEN=true \
7 LANG=C.UTF-8 \
8 LANGUAGE=$LANG
azvyagintseve67f7352018-12-20 16:11:40 +02009SHELL ["/bin/bash", "-o", "pipefail", "-c"]
azvyagintsevec38a1c2018-12-18 16:10:14 +020010
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -050011USER root
azvyagintseve67f7352018-12-20 16:11:40 +020012ARG UBUNTU_MIRROR_URL="http://archive.ubuntu.com/ubuntu"
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -050013
14WORKDIR /var/lib/
Hanna Arhipova55cc1292019-01-08 14:22:18 +020015COPY bin/ /usr/local/bin/
16COPY test_set/ ./
17#
azvyagintseve67f7352018-12-20 16:11:40 +020018RUN set -ex; pushd /etc/apt/ && echo > sources.list && \
19 echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages && \
20 echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes && \
21 echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends && \
22 echo "deb [arch=amd64] $UBUNTU_MIRROR_URL xenial main restricted universe multiverse" >> sources.list && \
23 echo "deb [arch=amd64] $UBUNTU_MIRROR_URL xenial-updates main restricted universe multiverse" >> sources.list && \
24 echo "deb [arch=amd64] $UBUNTU_MIRROR_URL xenial-backports main restricted universe multiverse" >> sources.list && \
25 popd ; apt-get update && apt-get upgrade -y && \
Hanna Arhipova55cc1292019-01-08 14:22:18 +020026 apt-get install -y build-essential curl git-core iputils-ping libffi-dev libldap2-dev libsasl2-dev libssl-dev patch python-dev python-pip python3-dev vim-tiny wget \
azvyagintseve67f7352018-12-20 16:11:40 +020027 python-virtualenv python3-virtualenv && \
Hanna Arhipova55cc1292019-01-08 14:22:18 +020028# Due to upstream bug we should use fixed version of pip
29 python -m pip install --upgrade 'pip==9.0.3' \
30 # initialize cvp sanity test suite
Hanna Arhipova16e93fb2019-01-23 19:03:01 +020031 && pushd cvp-sanity \
Hanna Arhipova55cc1292019-01-08 14:22:18 +020032 && virtualenv venv \
33 && . venv/bin/activate \
34 && pip install -r requirements.txt \
35 && deactivate \
36 && popd \
37 # initialize cvp spt test suite
Hanna Arhipova16e93fb2019-01-23 19:03:01 +020038 && pushd cvp-spt \
Hanna Arhipova55cc1292019-01-08 14:22:18 +020039 && virtualenv venv \
40 && . venv/bin/activate \
41 && pip install -r requirements.txt \
42 && deactivate \
43 && popd && \
azvyagintsevec38a1c2018-12-18 16:10:14 +020044# Cleanup
azvyagintseve67f7352018-12-20 16:11:40 +020045 apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc && \
46 apt-get -y autoremove; apt-get -y clean ; rm -rf /root/.cache; rm -rf /var/lib/apt/lists/* && \
47 rm -rf /tmp/* ; rm -rf /var/tmp/* ; rm -rfv /etc/apt/sources.list.d/* ; echo > /etc/apt/sources.list
Hanna Arhipova55cc1292019-01-08 14:22:18 +020048
49ENTRYPOINT ["entrypoint.sh"]
50# docker build --no-cache -t cvp-sanity-checks:test_latest .