blob: bcc2ba833649e9548980b650ac83bfda7cfde8a6 [file] [log] [blame]
azvyagintsevf19ddc82018-02-20 18:39:32 +02001FROM ubuntu:16.04
azvyagintsevf19ddc82018-02-20 18:39:32 +02002LABEL maintainer="qa@mirantis.com"
3
azvyagintsevf19ddc82018-02-20 18:39:32 +02004ENV DEBIAN_FRONTEND=noninteractive \
5 DEBCONF_NONINTERACTIVE_SEEN=true \
6 LANG=C.UTF-8 \
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +00007 LANGUAGE=$LANG \
8 LOG_DIR='/root/tempest'
9SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
azvyagintsevf19ddc82018-02-20 18:39:32 +020010USER root
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +000011ADD data /var/lib/
12
13COPY extra/build.sh /
14COPY bin/entrypoint.sh /usr/bin/
15COPY bin/run_tempest.sh /usr/bin/run-tempest
16COPY bin/skiplists /var/lib/tempest/skiplists
17
18# Patch junitxml library to include skipped tests in the test report totals header
19COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch
20
21# Patch os_testr library to fix issue ralated with tempest black-list option
22COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch
23
azvyagintsevf19ddc82018-02-20 18:39:32 +020024RUN cd /etc/apt/ && echo > sources.list \
25 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
26 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
27 && echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
28 && echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
29 && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
30 && echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
31 && apt-get update && apt-get upgrade -y \
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +000032 && 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 +030033#Due to upstream bug we should use fixed version of pip
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +000034 && pip install -U 'pip==18.0' \
35# Do main stuff
36 && /build.sh buildme \
37# Cleanup
38 && apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
39 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
40 && apt-get -y autoremove; apt-get -y clean \
41 && rm -rf /root/.cache \
42 && rm -rf /var/lib/apt/lists/*
sandriichenko3a043ca2018-06-15 11:08:36 +030043
azvyagintsevf19ddc82018-02-20 18:39:32 +020044#
45COPY bin/entrypoint.sh /usr/bin/entrypoint.sh
sandriichenko7ec32172018-03-19 17:21:21 +020046COPY bin/run_tempest.sh /usr/bin/run-tempest
47
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +000048RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch
49RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch
Maksym Shalamov98189f52018-04-24 13:36:26 +030050
azvyagintsevf19ddc82018-02-20 18:39:32 +020051WORKDIR /var/lib/tempest/
52ENTRYPOINT ["/usr/bin/entrypoint.sh"]
53
54# Build
Aleksey Zvyagintsev29020fd2018-11-07 10:29:57 +000055# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .