Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipe for ptf docker #112

Merged
merged 1 commit into from
Jan 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to define these vars?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a recipe for building a docker image
It defines name of the image, path to dockerfile and debian packages that it needs to install