From 211c8cd53652094a9c5d537d9d615338127c7cd4 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Wed, 3 Jul 2019 20:37:55 +0300 Subject: [PATCH] [syncd-rpc] fix syncd rpc build and add cleanup (#3113) Signed-off-by: Stepan Blyschak --- platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 index aaafd39f51..d9b86e7825 100644 --- a/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx-rpc/Dockerfile.j2 @@ -4,6 +4,8 @@ FROM docker-syncd-mlnx ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get purge -y syncd + {% if docker_syncd_mlnx_rpc_debs.strip() -%} # Copy locally-built Debian package dependencies {{ 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(' ')) }} {% endif %} -RUN apt-get purge -y syncd - ## Pre-install the fundamental packages RUN apt-get update \ && apt-get -y install \ @@ -54,4 +54,10 @@ RUN apt-get update \ 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"]