sonic-buildimage/dockers/docker-lldp/Dockerfile
pavel-shirshov a845740543 [All Dockerfiles]: Prevent apt asking questions on the console (#300)
Add noninteractive setting into every Dockerfile in the repo

Signed-off-by: Pavel Shirshov pavelsh@microsoft.com
2017-02-16 21:48:49 -08:00

26 lines
872 B
Docker

FROM docker-base
COPY deps/sswsdk*.whl deps/lldpsyncd_*.deb deps/lldpd_*.deb /deps/
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
## Pre-install the fundamental packages
## Install Python SSWSDK (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/sswsdk*.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"]