2016-05-27 15:30:13 -05:00
|
|
|
FROM docker-base
|
2016-03-08 13:42:20 -06:00
|
|
|
|
2017-03-30 13:51:05 -05:00
|
|
|
COPY deps/swsssdk*.whl deps/lldpsyncd_*.deb deps/lldpd_*.deb /deps/
|
2016-03-08 13:42:20 -06:00
|
|
|
|
2017-03-30 13:51:05 -05:00
|
|
|
# Make apt-get non-interactive
|
2017-02-16 23:48:49 -06:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2017-03-30 13:51:05 -05:00
|
|
|
# Pre-install the fundamental packages
|
|
|
|
# Install Python SwSS SDK (lldpsyncd dependency)
|
|
|
|
# Install LLDP Sync Daemon
|
|
|
|
# Note: dpkg_apt function has the benefit to detect missing .deb file
|
|
|
|
# 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 && \
|
2017-03-30 13:51:05 -05:00
|
|
|
pip install /deps/swsssdk*.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"]
|