sonic-buildimage/dockers/docker-platform-monitor/Dockerfile.j2
Joe LeVeque d094ceecc2 [docker-platform-monitor]: Add LED control daemon and plugin for x86_64-arista_7050_qx32 platform (#691)
* Add files for building ledd package; add ledd to docker-platform-monitor; Control platform monitor docker using supervisord

* Add sonic-platform-daemons submodule

* Rename ledd.mk -> sonic-ledd.mk

* Add led_control.py plugin for x86_64-arista_7050_qx32 platform

* Rename Dockerfile -> Dockerfile.j2

* Fix build

* Remove blank line
2017-06-10 22:05:11 -07:00

62 lines
1.4 KiB
Django/Jinja
Executable File

FROM docker-config-engine
# Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Update apt's package index files
RUN apt-get update
RUN apt-get install -y python-pip sensord
{% if docker_platform_monitor_debs.strip() %}
# Copy built Debian packages
COPY \
{% for deb in docker_platform_monitor_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
{%- endif %}
{% if docker_platform_monitor_debs.strip() %}
# Install built Debian packages
RUN dpkg -i \
{% for deb in docker_platform_monitor_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor %}
{%- endif %}
{% if docker_platform_monitor_whls.strip() %}
# Copy built Python wheels
COPY \
{% for whl in docker_platform_monitor_whls.split(' ') -%}
python-wheels/{{ whl }}{{' '}}
{%- endfor -%}
python-wheels/
{%- endif %}
{% if docker_platform_monitor_whls.strip() %}
# Install built Python wheels
RUN pip install \
{% for whl in docker_platform_monitor_whls.split(' ') -%}
python-wheels/{{ whl }}{{' '}}
{%- endfor %}
{%- endif %}
COPY python-wheels /python-wheels
# Install Python SwSS SDK (dependency of sonic-ledd)
RUN pip install /python-wheels/swsssdk-2.0.1-py2-none-any.whl
# Clean up
RUN apt-get remove -y python-pip
RUN apt-get clean -y
RUN apt-get autoclean -y
RUN apt-get autoremove -y
RUN rm -rf /debs /python-wheels ~/.cache
COPY ["start.sh", "lm-sensors.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["/usr/bin/supervisord"]