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
|
|
|
|
|
2019-06-22 13:26:23 -05:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -f -y \
|
|
|
|
libdbus-1-3 \
|
|
|
|
libdaemon0 \
|
|
|
|
libjansson4 \
|
|
|
|
# Install redis-tools dependencies
|
|
|
|
# TODO: implicitly install dependencies
|
2019-07-04 00:16:10 -05:00
|
|
|
libatomic1 \
|
|
|
|
libjemalloc1 \
|
|
|
|
liblua5.1-0 \
|
|
|
|
lua-bitop \
|
|
|
|
lua-cjson
|
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/"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|