blob: 7850555129aa3250b5fdd06dc06b06b16646e54a [file] [log] [blame]
FROM ubuntu:16.04
LABEL maintainer="qa@mirantis.com"
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true \
LANG=C.UTF-8 \
LANGUAGE=$LANG \
LOG_DIR='/root/tempest'
SHELL ["/bin/bash", "-o", "pipefail", "-xec"]
USER root
ADD data /var/lib/
COPY extra/build.sh /
COPY bin/entrypoint.sh /usr/bin/
COPY bin/run_tempest.sh /usr/bin/run-tempest
COPY bin/opencontrail/policy.json /etc/opencontrail/policy.json
COPY bin/skiplists /var/lib/tempest/skiplists
# Patch junitxml library to include skipped tests in the test report totals header
COPY bin/patches/junitxml_init.patch /var/lib/junitxml_init.patch
# Patch os_testr library to fix issue ralated with tempest black-list option
COPY bin/patches/regex_builder.patch /var/lib/regex_builder.patch
RUN cd /etc/apt/ && echo > sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" >> sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse" >> sources.list \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse" >> sources.list \
&& echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages \
&& echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes \
&& echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends \
&& apt-get update && apt-get upgrade -y \
&& apt-get install -y vim-tiny git-core python-pip libffi-dev libssl-dev python-dev python3-dev iputils-ping patch \
#Due to upstream bug we should use fixed version of pip
&& pip install -U 'pip==18.0' \
# Do main stuff
&& /build.sh buildme \
# Cleanup
&& apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 \
ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc \
&& apt-get -y autoremove; apt-get -y clean \
&& rm -rf /root/.cache \
&& rm -rf /var/lib/apt/lists/*
RUN patch /usr/local/lib/python2.7/dist-packages/junitxml/__init__.py /var/lib/junitxml_init.patch
RUN patch /usr/local/lib/python2.7/dist-packages/os_testr/regex_builder.py /var/lib/regex_builder.patch
WORKDIR /var/lib/tempest/
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
# docker build --no-cache -t docker-ci-tempest:$(date "+%Y_%m_%d_%H_%M_%S") .