2019-09-14 22:27:09 -05:00
|
|
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
2022-04-27 19:39:37 -05:00
|
|
|
FROM docker-swss-layer-buster-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
2019-09-14 22:27:09 -05:00
|
|
|
|
|
|
|
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 && \
|
|
|
|
apt-get install -f -y \
|
|
|
|
dmidecode \
|
|
|
|
libmnl0=1.0.4-2
|
|
|
|
|
|
|
|
{% if docker_sflow_debs.strip() -%}
|
|
|
|
# Copy locally-built Debian package dependencies
|
|
|
|
{{ copy_files("debs/", docker_sflow_debs.split(' '), "/debs/") }}
|
|
|
|
|
|
|
|
# Install locally-built Debian packages and implicitly install their dependencies
|
|
|
|
{{ install_debian_packages(docker_sflow_debs.split(' ')) }}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
RUN apt-get clean -y && \
|
|
|
|
apt-get autoclean -y && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
rm -rf /debs
|
|
|
|
|
|
|
|
RUN sed -ri '/^DAEMON_ARGS=""/c DAEMON_ARGS="-c /var/log/hsflowd.crash"' /etc/init.d/hsflowd
|
|
|
|
|
|
|
|
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
2019-11-25 15:02:00 -06:00
|
|
|
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
|
|
|
COPY ["critical_processes", "/etc/supervisor"]
|
2020-06-24 00:23:08 -05:00
|
|
|
COPY ["port_index_mapper.py", "/usr/bin"]
|
2019-09-14 22:27:09 -05:00
|
|
|
|
2020-11-22 23:18:44 -06:00
|
|
|
ENTRYPOINT ["/usr/local/bin/supervisord"]
|