2016-05-27 15:30:13 -05:00
|
|
|
FROM docker-base
|
2016-03-08 13:42:20 -06:00
|
|
|
|
2016-10-25 20:52:13 -05:00
|
|
|
COPY deps/sswsdk*.whl deps/lldpsyncd_*.deb deps/lldpd_*.deb /deps/
|
2016-03-08 13:42:20 -06:00
|
|
|
|
2016-07-26 14:01:58 -05:00
|
|
|
## Pre-install the fundamental packages
|
2016-10-25 20:52:13 -05:00
|
|
|
## Install Python SSWSDK (lldpsyncd dependency)
|
2016-03-08 13:42:20 -06:00
|
|
|
## Install LLDP Sync Daemon
|
|
|
|
## Note: dpkg_apt function has the benefit to detect missing .deb file
|
2016-05-27 15:30:13 -05:00
|
|
|
## Clean up
|
2016-10-25 20:52:13 -05:00
|
|
|
RUN apt-get update && \
|
|
|
|
dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } && \
|
|
|
|
dpkg_apt /deps/lldpd_*.deb && \
|
|
|
|
dpkg_apt /deps/lldpsyncd_*.deb && \
|
2016-09-09 19:53:41 -05:00
|
|
|
apt-get install -y python-pip supervisor && \
|
2016-10-25 20:52:13 -05:00
|
|
|
pip install /deps/sswsdk*.whl && \
|
2016-08-04 12:39:33 -05:00
|
|
|
apt-get remove -y python-pip && \
|
2016-10-25 20:52:13 -05:00
|
|
|
apt-get purge -y && apt-get autoclean -y && apt-get autoremove -y && \
|
|
|
|
rm -rf /deps ~/.cache
|
2016-05-27 15:30:13 -05:00
|
|
|
|
2016-09-09 19:53:41 -05:00
|
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
2016-05-27 15:30:13 -05:00
|
|
|
|
2016-09-09 19:53:41 -05:00
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|