blob: 8b7762834559cd76aa41d3c5a1423b0b5e5ddf09 [file] [log] [blame]
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -05001FROM ubuntu:16.04
2
azvyagintsevec38a1c2018-12-18 16:10:14 +02003LABEL maintainer="dev@mirantis.com"
4
5ENV DEBIAN_FRONTEND=noninteractive \
6 DEBCONF_NONINTERACTIVE_SEEN=true \
7 LANG=C.UTF-8 \
8 LANGUAGE=$LANG
9SHELL ["/bin/bash", "-xeo", "pipefail", "-c"]
10
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -050011USER root
azvyagintsevec38a1c2018-12-18 16:10:14 +020012RUN mkdir -p /var/lib/cvp-sanity/
13COPY cvp-sanity/ /var/lib/cvp-sanity
Oleksii Zhurba4ccdbf22018-09-04 21:00:19 -050014
15WORKDIR /var/lib/
16
azvyagintsevec38a1c2018-12-18 16:10:14 +020017RUN pushd /etc/apt/ && echo > sources.list && \
18 echo 'Acquire::Languages "none";' > apt.conf.d/docker-no-languages && \
19 echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > apt.conf.d/docker-gzip-indexes && \
20 echo 'APT::Get::Install-Recommends "false"; APT::Get::Install-Suggests "false";' > apt.conf.d/docker-recommends && \
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 popd ; apt-get update && apt-get upgrade -y && \
25 apt-get install -y curl git-core iputils-ping libffi-dev libldap2-dev libsasl2-dev libssl-dev patch python-dev python-pip python3-dev vim-tiny wget \
26 python-virtualenv python3-virtualenv && \
27#Due to upstream bug we should use fixed version of pip
28 python -m pip install --upgrade 'pip==9.0.3' && \
29 pip install -r cvp-sanity/requirements.txt && \
30# Cleanup
31 apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 ppp pppconfig pppoeconf popularity-contest cpp gcc g++ libssl-doc && \
32 apt-get -y autoremove; apt-get -y clean ; rm -rf /root/.cache; rm -rf /var/lib/apt/lists/* && \
33 rm -rf /tmp/* ; rm -rf /var/tmp/* ; rm -rfv /etc/apt/sources.list.d/* ; echo > /etc/apt/sources.list
34COPY bin /usr/local/bin/
35ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
36# docker build --no-cache -t cvp-sanity-checks:$(date "+%Y_%m_%d_%H_%M_%S") .