ea546c861c
Why I did it Enable syncd container autorestart for Innovium platforms How I did it Add critical_process file and sypervisord.conf entry How to verify it Tested with autorestart/test_container_autorestart.py::test_containers_autorestart PASSED autorestart/test_container_autorestart.py::test_containers_autorestart[sonic-xxx-dut-sonic-xxx-dut|syncd] Signed-off-by: rck-innovium rck@innovium.com
38 lines
1008 B
Django/Jinja
Executable File
38 lines
1008 B
Django/Jinja
Executable File
FROM docker-config-engine-stretch-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
|
|
|
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
|
|
|
|
RUN apt-get update
|
|
|
|
COPY \
|
|
{% for deb in docker_syncd_invm_debs.split(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor -%}
|
|
debs/
|
|
|
|
# Needed for Innovium Debug Shell
|
|
RUN apt-get install -y net-tools
|
|
RUN apt-get install -y libpython2.7
|
|
RUN apt-get install -y libjansson4
|
|
|
|
RUN dpkg -i \
|
|
{% for deb in docker_syncd_invm_debs.split(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor %}
|
|
|
|
COPY ["start.sh", "/usr/bin/"]
|
|
COPY ["ivm_start.sh", "/usr/bin/"]
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
COPY ["critical_processes", "/etc/supervisor/"]
|
|
|
|
## Clean up
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
RUN rm -rf /debs
|
|
|
|
ENTRYPOINT ["/usr/local/bin/supervisord"]
|