Oleksii Zhurba | 4ccdbf2 | 2018-09-04 21:00:19 -0500 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
azvyagintsev | ec38a1c | 2018-12-18 16:10:14 +0200 | [diff] [blame] | 3 | LABEL maintainer="dev@mirantis.com" |
| 4 | |
| 5 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 6 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 7 | LANG=C.UTF-8 \ |
| 8 | LANGUAGE=$LANG |
azvyagintsev | e67f735 | 2018-12-20 16:11:40 +0200 | [diff] [blame] | 9 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
azvyagintsev | ec38a1c | 2018-12-18 16:10:14 +0200 | [diff] [blame] | 10 | |
Oleksii Zhurba | 4ccdbf2 | 2018-09-04 21:00:19 -0500 | [diff] [blame] | 11 | USER root |
azvyagintsev | e67f735 | 2018-12-20 16:11:40 +0200 | [diff] [blame] | 12 | ARG UBUNTU_MIRROR_URL="http://archive.ubuntu.com/ubuntu" |
Oleksii Zhurba | 4ccdbf2 | 2018-09-04 21:00:19 -0500 | [diff] [blame] | 13 | |
| 14 | WORKDIR /var/lib/ |
Hanna Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 15 | COPY bin/ /usr/local/bin/ |
| 16 | COPY test_set/ ./ |
| 17 | # |
azvyagintsev | e67f735 | 2018-12-20 16:11:40 +0200 | [diff] [blame] | 18 | RUN 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 Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 26 | 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 \ |
azvyagintsev | e67f735 | 2018-12-20 16:11:40 +0200 | [diff] [blame] | 27 | python-virtualenv python3-virtualenv && \ |
Hanna Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 28 | # 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 Arhipova | 16e93fb | 2019-01-23 19:03:01 +0200 | [diff] [blame^] | 31 | && pushd cvp-sanity \ |
Hanna Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 32 | && virtualenv venv \ |
| 33 | && . venv/bin/activate \ |
| 34 | && pip install -r requirements.txt \ |
| 35 | && deactivate \ |
| 36 | && popd \ |
| 37 | # initialize cvp spt test suite |
Hanna Arhipova | 16e93fb | 2019-01-23 19:03:01 +0200 | [diff] [blame^] | 38 | && pushd cvp-spt \ |
Hanna Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 39 | && virtualenv venv \ |
| 40 | && . venv/bin/activate \ |
| 41 | && pip install -r requirements.txt \ |
| 42 | && deactivate \ |
| 43 | && popd && \ |
azvyagintsev | ec38a1c | 2018-12-18 16:10:14 +0200 | [diff] [blame] | 44 | # Cleanup |
azvyagintsev | e67f735 | 2018-12-20 16:11:40 +0200 | [diff] [blame] | 45 | 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 Arhipova | 55cc129 | 2019-01-08 14:22:18 +0200 | [diff] [blame] | 48 | |
| 49 | ENTRYPOINT ["entrypoint.sh"] |
| 50 | # docker build --no-cache -t cvp-sanity-checks:test_latest . |