sonic-buildimage/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2
lguohan f20665008c
[build]: put stretch debian packages under target/debs/stretch/ (#2519)
* [build]: put stretch debian packages under target/debs/stretch/

* in stretch build phase, all debian packages built in that stage are placed under target/debs/stretch directory.
* for python-based debian packages, since they are really the same for jessie and stretch, they are placed under target/python-debs directory.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-02-04 22:06:37 -08:00

62 lines
1.7 KiB
Django/Jinja

FROM docker-syncd-mlnx
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
COPY \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
COPY \
{% for deb in docker_syncd_mlnx_rpc_pydebs.split(' ') -%}
python-debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -P syncd
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_mlnx_rpc_pydebs.split(' ') -%}
dpkg_apt debs/{{ deb }}{{'; '}}
## Pre-install the fundamental packages
RUN apt-get update \
&& apt-get -y install \
net-tools \
python-pip \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
wget \
cmake \
&& wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
&& mkdir -p build \
&& cmake . \
&& make install \
&& ldconfig \
&& cd .. \
&& rm -fr nanomsg-1.0.0 \
&& rm -f 1.0.0.tar.gz \
&& pip install cffi==1.7.0 \
&& pip install --upgrade cffi==1.7.0 \
&& pip install nnpy \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /root/deps
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["/usr/bin/supervisord"]