Skip to content

Commit

Permalink
Add recipe for ptf docker
Browse files Browse the repository at this point in the history
  • Loading branch information
marian-pritsak authored and pavel-shirshov committed Jan 5, 2017
1 parent a0281f8 commit 43b0e50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
16 changes: 10 additions & 6 deletions dockers/docker-ptf/Dockerfile → dockers/docker-ptf/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/* \
Expand Down
6 changes: 6 additions & 0 deletions rules/docker-ptf.mk
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 43b0e50

Please sign in to comment.