From f963bc94d4681b74076acf5c8a989c3d4eedd347 Mon Sep 17 00:00:00 2001 From: richardyu Date: Thu, 12 Aug 2021 09:30:43 -0700 Subject: [PATCH] [202012][saiserver docker]adds saiserver dependences (#8447) Co-authored-by: richardyu-ms --- .../broadcom/docker-saiserver-brcm/Dockerfile.j2 | 13 ++++++++----- .../broadcom/docker-saiserver-brcm/supervisord.conf | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/platform/broadcom/docker-saiserver-brcm/Dockerfile.j2 b/platform/broadcom/docker-saiserver-brcm/Dockerfile.j2 index a4b4fedd39ad..3fbbceb6989f 100644 --- a/platform/broadcom/docker-saiserver-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-saiserver-brcm/Dockerfile.j2 @@ -1,3 +1,4 @@ +{% from "dockers/dockerfile-macros.j2" import install_debian_packages %} FROM docker-config-engine-buster ARG docker_container_name @@ -6,7 +7,11 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update +## Pre-install the fundamental packages +RUN apt-get update \ + && apt-get -y install \ + gdb \ + libboost-atomic1.71.0 COPY \ {% for deb in docker_saiserver_brcm_debs.split(' ') -%} @@ -14,10 +19,8 @@ debs/{{ deb }}{{' '}} {%- endfor -%} debs/ -RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \ -{% for deb in docker_saiserver_brcm_debs.split(' ') -%} -dpkg_apt debs/{{ deb }}{{'; '}} -{%- endfor %} +# Install locally-built Debian packages and implicitly install their dependencies +{{ install_debian_packages(docker_saiserver_brcm_debs.split(' ')) }} ## TODO: add kmod into Depends RUN apt-get install -yf kmod diff --git a/platform/broadcom/docker-saiserver-brcm/supervisord.conf b/platform/broadcom/docker-saiserver-brcm/supervisord.conf index cb67a0fc9a47..e90e41645042 100644 --- a/platform/broadcom/docker-saiserver-brcm/supervisord.conf +++ b/platform/broadcom/docker-saiserver-brcm/supervisord.conf @@ -20,7 +20,7 @@ stdout_logfile=syslog stderr_logfile=syslog [program:saiserver] -command=/usr/bin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini +command=/usr/sbin/saiserver -p /etc/sai/profile.ini -f /etc/sai/portmap.ini priority=3 autostart=false autorestart=false