4fe1bdcf87
Add a sonic-config-engine to help generate config file based on minigraph and other data on runtime. Modify fpm, teamd, lldp, snmp, and platform-monitor docker to use sonic-config-engine to generate config in docker upon load.
29 lines
813 B
Django/Jinja
Executable File
29 lines
813 B
Django/Jinja
Executable File
FROM docker-base
|
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install -y smartmontools sensord
|
|
|
|
# Dependencies for sonic-cfggen
|
|
RUN apt-get install -y python-lxml python-jinja2 python-netaddr python-ipaddr python-yaml
|
|
|
|
COPY debs/ debs
|
|
|
|
RUN dpkg -i \
|
|
{% for deb in docker_fpm_debs.split(' ') -%}
|
|
debs/{{ deb }}{{' '}}
|
|
{%- endfor %}
|
|
|
|
## Clean up
|
|
RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
|
RUN rm -rf /debs
|
|
|
|
COPY ["config.sh", "/usr/bin/"]
|
|
|
|
ENTRYPOINT /usr/bin/config.sh \
|
|
&& service rsyslog start \
|
|
&& service lm-sensors start \
|
|
&& service smartmontools start \
|
|
&& service sensord start \
|
|
&& /bin/bash
|