[docker-syncd-rpc]: Fix Dockerfile (#513)

* Use dpkg_apt properly

* Remove unused dpkg_apt

* Purge not remove previous version of syncd
This commit is contained in:
pavel-shirshov 2017-04-17 17:27:42 -07:00 committed by GitHub
parent ebd9af97c4
commit c0e292ecd2
2 changed files with 4 additions and 8 deletions

View File

@ -9,12 +9,11 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -r syncd
RUN dpkg -P syncd
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
dpkg_apt \
{% for deb in docker_syncd_brcm_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}
## Pre-install the fundamental packages
@ -45,7 +44,6 @@ RUN apt-get update \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /deps

View File

@ -9,12 +9,11 @@ debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -r syncd
RUN dpkg -P syncd
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
dpkg_apt \
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}
## Pre-install the fundamental packages
@ -45,7 +44,6 @@ RUN apt-get update \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /deps