[syncd-rpc] fix syncd rpc build and add cleanup (#3113)

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
This commit is contained in:
Stepan Blyshchak 2019-07-03 20:37:55 +03:00 committed by lguohan
parent 56608bf06b
commit 211c8cd536

View File

@ -4,6 +4,8 @@ FROM docker-syncd-mlnx
## Make apt-get non-interactive ## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get purge -y syncd
{% if docker_syncd_mlnx_rpc_debs.strip() -%} {% if docker_syncd_mlnx_rpc_debs.strip() -%}
# Copy locally-built Debian package dependencies # Copy locally-built Debian package dependencies
{{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }} {{ copy_files("debs/", docker_syncd_mlnx_rpc_debs.split(' '), "/debs/") }}
@ -20,8 +22,6 @@ ENV DEBIAN_FRONTEND=noninteractive
{{ install_debian_packages(docker_syncd_mlnx_rpc_pydebs.split(' ')) }} {{ install_debian_packages(docker_syncd_mlnx_rpc_pydebs.split(' ')) }}
{% endif %} {% endif %}
RUN apt-get purge -y syncd
## Pre-install the fundamental packages ## Pre-install the fundamental packages
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \
@ -54,4 +54,10 @@ RUN apt-get update \
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
## Clean up
RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get autoremove -y && \
rm -rf /debs
ENTRYPOINT ["/usr/bin/supervisord"] ENTRYPOINT ["/usr/bin/supervisord"]