2019-06-22 13:26:23 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2019-02-09 00:05:38 -06:00
|
|
|
FROM docker-config-engine-stretch
|
2018-03-27 15:39:04 -05:00
|
|
|
|
2018-06-25 12:48:42 -05:00
|
|
|
ARG docker_container_name
|
2018-08-13 00:23:58 -05:00
|
|
|
RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%syslogtag%/;" /etc/rsyslog.conf
|
2018-06-25 12:48:42 -05:00
|
|
|
|
2018-03-27 15:39:04 -05:00
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2020-04-05 15:29:34 -05:00
|
|
|
RUN apt-get update
|
2018-03-27 15:39:04 -05:00
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
{% if docker_sonic_telemetry_debs.strip() -%}
|
|
|
|
# Copy locally-built Debian package dependencies
|
|
|
|
{{ copy_files("debs/", docker_sonic_telemetry_debs.split(' '), "/debs/") }}
|
2018-03-27 15:39:04 -05:00
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
|
|
{{ install_debian_packages(docker_sonic_telemetry_debs.split(' ')) }}
|
|
|
|
{%- endif %}
|
2018-03-27 15:39:04 -05:00
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get clean -y && \
|
|
|
|
apt-get autoclean - && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
rm -rf /debs
|
2018-03-27 15:39:04 -05:00
|
|
|
|
|
|
|
COPY ["start.sh", "telemetry.sh", "dialout.sh", "/usr/bin/"]
|
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
2019-11-18 18:56:44 -06:00
|
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
|
|
COPY ["critical_processes", "/etc/supervisor"]
|
2018-03-27 15:39:04 -05:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|