blob: e928caac4c00744f45548007dd2ab7ae6f90099d [file] [log] [blame]
azvyagintsevf19ddc82018-02-20 18:39:32 +02001FROM ubuntu:16.04
2
3LABEL maintainer="qa@mirantis.com"
4
azvyagintsevf19ddc82018-02-20 18:39:32 +02005ENV DEBIAN_FRONTEND=noninteractive \
6 DEBCONF_NONINTERACTIVE_SEEN=true \
7 LANG=C.UTF-8 \
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +00008 LANGUAGE=$LANG \
9 LOG_DIR='/root/tempest'
azvyagintsevcafdd672018-11-12 15:32:16 +020010SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
azvyagintsevf19ddc82018-02-20 18:39:32 +020011USER root
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000012ADD data /var/lib/
13
14COPY extra/build.sh /
15COPY bin/entrypoint.sh /usr/bin/
16COPY bin/run_tempest.sh /usr/bin/run-tempest
17COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
18COPY bin/skiplists /var/lib/tempest/skiplists
19
azvyagintsevf19ddc82018-02-20 18:39:32 +020020RUN cd /etc/apt/ && echo > sources.list \
21 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
22 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
23 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
24 && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
25 && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
26 && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
27 && apt-get update && apt-get upgrade -y \
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000028 && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch \
Maksym Shalamova95d7202018-04-19 17:21:19 +030029#Due to upstream bug we should use fixed version of pip
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000030 && pip install -U 'pip==18.0' \
31# Do main stuff
32 && /build.sh buildme \
33# Cleanup
34 && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
35 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
36 && apt-get -y autoremove; apt-get -y clean \
37 && rm -rf /root/.cache \
38 && rm -rf /var/lib/apt/lists/*
azvyagintsevf19ddc82018-02-20 18:39:32 +020039
Maksym Shalamov6f5e8d92018-04-12 18:19:09 +030040# Patch junitxml library to include skipped tests in the test report totals header
41COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch
42RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch
sandriichenko7ec32172018-03-19 17:21:21 +020043
azvyagintsevf19ddc82018-02-20 18:39:32 +020044WORKDIR /var/lib/tempest/
45ENTRYPOINT ["/usr/bin/entrypoint.sh"]
46
47# Build
Aleksey Zvyagintsevc3d46bc2018-11-07 10:29:57 +000048# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .