From a98d1af22cbd97ebc3374894c1504e81873825a2 Mon Sep 17 00:00:00 2001 From: marian-pritsak Date: Fri, 9 Dec 2016 12:24:08 +0200 Subject: [PATCH] Add recipe for ptf docker --- dockers/docker-ptf/{Dockerfile => Dockerfile.j2} | 16 ++++++++++------ rules/docker-ptf.mk | 6 ++++++ 2 files changed, 16 insertions(+), 6 deletions(-) rename dockers/docker-ptf/{Dockerfile => Dockerfile.j2} (89%) create mode 100644 rules/docker-ptf.mk diff --git a/dockers/docker-ptf/Dockerfile b/dockers/docker-ptf/Dockerfile.j2 similarity index 89% rename from dockers/docker-ptf/Dockerfile rename to dockers/docker-ptf/Dockerfile.j2 index d72391a7ba43..db67c3261d36 100644 --- a/dockers/docker-ptf/Dockerfile +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -3,7 +3,7 @@ FROM debian:jessie MAINTAINER Pavel Shirshov ## Copy dependencies -COPY deps /root/deps +COPY debs /debs ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -35,11 +35,15 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' / python-dev \ wget \ cmake \ - && dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \ - && dpkg_apt /root/deps/python-ptf_*.deb \ - && dpkg_apt /root/deps/libthrift-0.9.3_*.deb \ - && dpkg_apt /root/deps/python-thrift_*.deb \ - && rm -rf /root/deps \ + libqt5core5a \ + libqt5network5 + +RUN dpkg -i \ +{% for deb in docker_ptf_debs.split(' ') -%} +debs/{{ deb }}{{' '}} +{%- endfor %} + +RUN rm -rf /debs \ && apt-get -y autoclean \ && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* \ diff --git a/rules/docker-ptf.mk b/rules/docker-ptf.mk new file mode 100644 index 000000000000..2782c45339bd --- /dev/null +++ b/rules/docker-ptf.mk @@ -0,0 +1,6 @@ +# docker image for ptf + +DOCKER_PTF = docker-ptf.gz +$(DOCKER_PTF)_PATH = $(DOCKERS_PATH)/docker-ptf +$(DOCKER_PTF)_DEPENDS += $(LIBTHRIFT) $(PYTHON_THRIFT) $(PTF) +SONIC_DOCKER_IMAGES += $(DOCKER_PTF)