diff --git a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 index 912f52cf73..40c573f09c 100644 --- a/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm-rpc/Dockerfile.j2 @@ -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 diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index 15c998385a..64e2081127 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -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