33bf592f09
Why I did it why In order to apply different config across different platform, and use the code with a unified format, reuse syncd init script to init saiserver. How I did it how Reuse syncd init script How to verify it Test Test in DUT s6000 and dx010 with sonic 202205
41 lines
1.2 KiB
Django/Jinja
41 lines
1.2 KiB
Django/Jinja
{% from "dockers/dockerfile-macros.j2" import install_debian_packages %}
|
|
FROM docker-config-engine-buster
|
|
|
|
ARG docker_container_name
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
|
|
|
## Make apt-get non-interactive
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
## 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(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor -%}
|
|
debs/
|
|
|
|
# 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
|
|
|
|
COPY ["files/dsserve", "files/bcmcmd", "start.sh", "bcmsh", "/usr/bin/"]
|
|
COPY ["saiserver_start.sh", "/usr/bin/"]
|
|
COPY ["files/syncd_init_common.sh", "/usr/bin/"]
|
|
RUN chmod +x /usr/bin/dsserve /usr/bin/bcmcmd
|
|
RUN chmod +x /usr/bin/saiserver_start.sh /usr/bin/syncd_init_common.sh
|
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
|
|
|
## Clean up
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
RUN rm -rf /debs
|
|
|
|
ENTRYPOINT ["/usr/local/bin/supervisord"]
|