[dockers]: Remove deprecated docker-lldp and docker-snmp (#1068)
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
This commit is contained in:
parent
c74007bb83
commit
b6cc73a0ad
@ -1,25 +0,0 @@
|
||||
FROM docker-base
|
||||
|
||||
COPY deps/swsssdk*.whl deps/lldpsyncd_*.deb deps/lldpd_*.deb /deps/
|
||||
|
||||
# Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# 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
|
||||
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 && \
|
||||
apt-get install -y python-pip supervisor && \
|
||||
pip install /deps/swsssdk*.whl && \
|
||||
apt-get remove -y python-pip && \
|
||||
apt-get purge -y && apt-get autoclean -y && apt-get autoremove -y && \
|
||||
rm -rf /deps ~/.cache
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
@ -1,19 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:lldpd]
|
||||
# https://github.com/vincentbernat/lldpd/commit/9856f2792c301116cc4a3fcfba91b9672ee5db1f
|
||||
# - `-d` means to stay in foreground, log to syslog
|
||||
# - `-dd` means to stay in foreground, log warnings to console
|
||||
# - `-ddd` means to stay in foreground, log warnings and info to console
|
||||
# - `-dddd` means to stay in foreground, log all to console
|
||||
command=/usr/sbin/lldpd -d -I Ethernet*,eth*
|
||||
priority=100
|
||||
|
||||
[program:lldpsyncd]
|
||||
command=/usr/sbin/lldpsyncd
|
||||
priority=200
|
||||
|
||||
[program:rsyslogd]
|
||||
command=/usr/sbin/rsyslogd -n
|
||||
priority=1
|
@ -1,48 +0,0 @@
|
||||
FROM docker-base
|
||||
|
||||
COPY deps/snmp_*.deb deps/snmpd_*.deb deps/libsnmp-base_*.deb deps/libsnmp30_*.deb /deps/
|
||||
COPY deps/python3/*.whl /python3/
|
||||
|
||||
# enable -O for all Python calls
|
||||
ENV PYTHONOPTIMIZE 1
|
||||
|
||||
## Make apt-get non-interactive
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
## Pre-install the fundamental packages
|
||||
## Install SNMP subagent
|
||||
## Note: dpkg_apt function has the benefit to detect missing .deb file
|
||||
## Clean up
|
||||
RUN apt-get update && \
|
||||
dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } && \
|
||||
dpkg_apt /deps/libsnmp-base_*.deb && \
|
||||
dpkg_apt /deps/libsnmp30_*.deb && \
|
||||
dpkg_apt /deps/snmp_*.deb && \
|
||||
dpkg_apt /deps/snmpd_*.deb && \
|
||||
rm -rf /deps
|
||||
|
||||
# install subagent
|
||||
RUN apt-get -y install build-essential wget libssl-dev openssl supervisor && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz && \
|
||||
tar xvf Python-3.5.2.tgz && cd Python-3.5.2 && \
|
||||
./configure --without-doc-strings --prefix=/usr --without-pymalloc --enable-shared && \
|
||||
make && make install && \
|
||||
ldconfig && \
|
||||
cd .. && rm -rf Python-3.5.2 && rm Python-3.5.2.tgz && \
|
||||
pip3 install --no-cache-dir /python3/*py3*.whl hiredis && \
|
||||
rm -rf /python3 && \
|
||||
python3 -m acs_ax_impl install && \
|
||||
python3 -m pip uninstall -y pip setuptools && \
|
||||
/bin/bash -c "rm -rf /usr/lib/python3.5/{unittest,lib2to3,tkinter,idlelib,email,test}" && \
|
||||
apt-get -y purge build-essential wget libssl-dev openssl && \
|
||||
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y && \
|
||||
find / | grep -E "__pycache__" | xargs rm -rf && \
|
||||
rm -rf ~/.cache
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
## Although exposing ports is not need for host net mode, keep it for possible bridge mode
|
||||
EXPOSE 161/udp 162/udp
|
||||
|
||||
ENTRYPOINT ["/usr/bin/supervisord"]
|
@ -1,14 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:snmpd]
|
||||
command=/usr/sbin/snmpd -f -LS4d -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf,ifTable,ifXTable -p /run/snmpd.pid
|
||||
priority=100
|
||||
|
||||
[program:acs-snmp-subagent]
|
||||
command=/usr/bin/env python3 -m acs_ax_impl
|
||||
priority=200
|
||||
|
||||
[program:rsyslogd]
|
||||
command=/usr/sbin/rsyslogd -n
|
||||
priority=1
|
Reference in New Issue
Block a user