azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 1 | FROM ubuntu:16.04 |
| 2 | |
| 3 | LABEL maintainer="qa@mirantis.com" |
| 4 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 5 | ENV DEBIAN_FRONTEND=noninteractive \ |
| 6 | DEBCONF_NONINTERACTIVE_SEEN=true \ |
| 7 | LANG=C.UTF-8 \ |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 8 | LANGUAGE=$LANG \ |
| 9 | LOG_DIR='/root/tempest' |
azvyagintsev | cafdd67 | 2018-11-12 15:32:16 +0200 | [diff] [blame] | 10 | SHELL ["/bin/bash", "-o", "pipefail", "-xec"] |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 11 | USER root |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 12 | ADD data /var/lib/ |
| 13 | |
| 14 | COPY extra/build.sh / |
| 15 | COPY bin/entrypoint.sh /usr/bin/ |
| 16 | COPY bin/run_tempest.sh /usr/bin/run-tempest |
| 17 | COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json |
| 18 | COPY bin/skiplists /var/lib/tempest/skiplists |
| 19 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 20 | RUN 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 Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 28 | && apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch \ |
Maksym Shalamov | a95d720 | 2018-04-19 17:21:19 +0300 | [diff] [blame] | 29 | #Due to upstream bug we should use fixed version of pip |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 30 | && 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/* |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 39 | |
Maksym Shalamov | 6f5e8d9 | 2018-04-12 18:19:09 +0300 | [diff] [blame] | 40 | # Patch junitxml library to include skipped tests in the test report totals header |
| 41 | COPY bin/patches/junitxml_init.patch /tmp/junitxml_init.patch |
| 42 | RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /tmp/junitxml_init.patch |
sandriichenko | 7ec3217 | 2018-03-19 17:21:21 +0200 | [diff] [blame] | 43 | |
azvyagintsev | f19ddc8 | 2018-02-20 18:39:32 +0200 | [diff] [blame] | 44 | WORKDIR /var/lib/tempest/ |
| 45 | ENTRYPOINT ["/usr/bin/entrypoint.sh"] |
| 46 | |
| 47 | # Build |
Aleksey Zvyagintsev | c3d46bc | 2018-11-07 10:29:57 +0000 | [diff] [blame] | 48 | # docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") . |