diff --git a/dockers/docker-base/Dockerfile b/dockers/docker-base/Dockerfile index b5f6b7c855..59af1f3ac6 100644 --- a/dockers/docker-base/Dockerfile +++ b/dockers/docker-base/Dockerfile @@ -13,6 +13,9 @@ RUN rm -rf \ /var/cache/man/* \ /usr/share/locale/* +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + ## Set the apt source COPY sources.list /etc/apt/sources.list COPY dpkg_01_drop /etc/dpkg/dpkg.cfg.d/01_drop diff --git a/dockers/docker-basic_router/Dockerfile b/dockers/docker-basic_router/Dockerfile index 095de44b02..8bf1875ab9 100644 --- a/dockers/docker-basic_router/Dockerfile +++ b/dockers/docker-basic_router/Dockerfile @@ -2,10 +2,14 @@ FROM docker-base MAINTAINER Xudong Wu +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + ## Set the apt source RUN apt-get clean && apt-get update COPY deps /deps + RUN dpkg -i /deps/libopennsl_*.deb; \ dpkg -i /deps/libsaibcm_*.deb; \ apt-get -y install -f diff --git a/dockers/docker-bgp/Dockerfile b/dockers/docker-bgp/Dockerfile index b01698e311..17c58524a0 100755 --- a/dockers/docker-bgp/Dockerfile +++ b/dockers/docker-bgp/Dockerfile @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + COPY deps/quagga_*.deb /deps/ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } && \ dpkg_apt /deps/quagga_*.deb && \ diff --git a/dockers/docker-config-engine/Dockerfile.j2 b/dockers/docker-config-engine/Dockerfile.j2 index 56ed38f10f..0679837240 100644 --- a/dockers/docker-config-engine/Dockerfile.j2 +++ b/dockers/docker-config-engine/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update # Dependencies for sonic-cfggen diff --git a/dockers/docker-database/Dockerfile.j2 b/dockers/docker-database/Dockerfile.j2 index cca7cd5359..af77177c58 100644 --- a/dockers/docker-database/Dockerfile.j2 +++ b/dockers/docker-database/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY \ diff --git a/dockers/docker-fpm/Dockerfile.j2 b/dockers/docker-fpm/Dockerfile.j2 index 5cdbff3a06..3f7445bd86 100644 --- a/dockers/docker-fpm/Dockerfile.j2 +++ b/dockers/docker-fpm/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-config-engine +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 diff --git a/dockers/docker-lldp-sv2/Dockerfile.j2 b/dockers/docker-lldp-sv2/Dockerfile.j2 index 32d73ecf32..79cdbb172f 100644 --- a/dockers/docker-lldp-sv2/Dockerfile.j2 +++ b/dockers/docker-lldp-sv2/Dockerfile.j2 @@ -8,6 +8,9 @@ debs/ COPY python-wheels /python-wheels +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update && apt-get install -y python-pip supervisor libbsd0 libevent-2.0-5 libjansson4 libwrap0 libxml2 libpci3 libperl5.20 ## Pre-install the fundamental packages diff --git a/dockers/docker-lldp/Dockerfile b/dockers/docker-lldp/Dockerfile index 528ac65a40..044e16953e 100644 --- a/dockers/docker-lldp/Dockerfile +++ b/dockers/docker-lldp/Dockerfile @@ -2,6 +2,9 @@ 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 diff --git a/dockers/docker-mlnx-sswsyncd/Dockerfile b/dockers/docker-mlnx-sswsyncd/Dockerfile index 4ce980aee3..631ff2e180 100755 --- a/dockers/docker-mlnx-sswsyncd/Dockerfile +++ b/dockers/docker-mlnx-sswsyncd/Dockerfile @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update ## Pre-install the fundamental packages diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index dd04379f57..0376c2c4d8 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-config-engine +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update RUN apt-get install -f -y ifupdown bridge-utils libdbus-1-3 libdaemon0 libjansson4 diff --git a/dockers/docker-platform-monitor/Dockerfile b/dockers/docker-platform-monitor/Dockerfile index 0d5a5dcb45..ea73830f8e 100755 --- a/dockers/docker-platform-monitor/Dockerfile +++ b/dockers/docker-platform-monitor/Dockerfile @@ -1,5 +1,8 @@ FROM docker-config-engine +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update RUN apt-get install -y smartmontools sensord diff --git a/dockers/docker-ptf-saithrift/Dockerfile b/dockers/docker-ptf-saithrift/Dockerfile index 88176faffb..0aa4947577 100644 --- a/dockers/docker-ptf-saithrift/Dockerfile +++ b/dockers/docker-ptf-saithrift/Dockerfile @@ -1,5 +1,8 @@ FROM docker-ptf +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY ["deps/saithrift-0.9.tar.gz", "/deps/"] diff --git a/dockers/docker-saiserver-brcm/Dockerfile b/dockers/docker-saiserver-brcm/Dockerfile index 054da7866f..3482c2068b 100755 --- a/dockers/docker-saiserver-brcm/Dockerfile +++ b/dockers/docker-saiserver-brcm/Dockerfile @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY ["deps/libsaibcm_*.deb","deps/libopennsl_*.deb","deps/python-sdk-api_*.deb", "deps/iproute2_*.deb", "deps/libthrift-0.9.3_*.deb", "deps/libnl-3-200_*.deb", "deps/libnl-genl-3-200_*.deb", "deps/libnl-route-3-200_*.deb", "/deps/"] diff --git a/dockers/docker-saiserver-mlnx/Dockerfile b/dockers/docker-saiserver-mlnx/Dockerfile index 49f7842c7a..5f51f5598b 100755 --- a/dockers/docker-saiserver-mlnx/Dockerfile +++ b/dockers/docker-saiserver-mlnx/Dockerfile @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY ["deps/applibs_*.deb", "/deps/applibs-dev_*.deb", "/deps/sx-complib_*.deb", "/deps/sxd-libs_*.deb", "/deps/sx-scew_*.deb", "/deps/sx-examples_*.deb", "/deps/sx-gen-utils_*.deb", "/deps/python-sdk-api_*.deb", "/deps/iproute2_*.deb", "/deps/mlnx-sai_*.deb", "/deps/libthrift-0.9.3_*.deb", "/deps/libnl-3-200_*.deb", "/deps/libnl-genl-3-200_*.deb", "/deps/libnl-route-3-200_*.deb", "/deps/"] diff --git a/dockers/docker-snmp-sv2/Dockerfile.j2 b/dockers/docker-snmp-sv2/Dockerfile.j2 index 21d1573f0e..332f485f72 100644 --- a/dockers/docker-snmp-sv2/Dockerfile.j2 +++ b/dockers/docker-snmp-sv2/Dockerfile.j2 @@ -12,6 +12,9 @@ COPY python-wheels/asyncsnmp-*-py3-*.whl /python-wheels/ # enable -O for all Python calls ENV PYTHONOPTIMIZE 1 +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + # install supervisor # install libsnmp30 dependencies # install libpython3.6-dev dependencies diff --git a/dockers/docker-snmp/Dockerfile b/dockers/docker-snmp/Dockerfile index 7ffc0b1228..c13428563e 100644 --- a/dockers/docker-snmp/Dockerfile +++ b/dockers/docker-snmp/Dockerfile @@ -6,6 +6,9 @@ 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 Python SSWSDK (SNMP subagent dependency) ## Install SNMP subagent diff --git a/dockers/docker-sswsyncd/Dockerfile b/dockers/docker-sswsyncd/Dockerfile index 7d83c67a25..0f555d8b51 100755 --- a/dockers/docker-sswsyncd/Dockerfile +++ b/dockers/docker-sswsyncd/Dockerfile @@ -8,6 +8,9 @@ COPY deps/sswsyncd_*.deb \ /deps/ +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + ## Install packages ## Clean up RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } && \ diff --git a/dockers/docker-teamd/Dockerfile.j2 b/dockers/docker-teamd/Dockerfile.j2 index 35492bdb46..7cb86e5b7e 100644 --- a/dockers/docker-teamd/Dockerfile.j2 +++ b/dockers/docker-teamd/Dockerfile.j2 @@ -16,6 +16,9 @@ debs/{{ deb }}{{' '}} COPY ["start.sh", "config.sh", "/usr/bin/"] COPY ["teamd.j2", "/etc/swss/teamd/"] +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs diff --git a/dockers/docker-vas/Dockerfile b/dockers/docker-vas/Dockerfile index 84b5eb46d4..fb207d0719 100755 --- a/dockers/docker-vas/Dockerfile +++ b/dockers/docker-vas/Dockerfile @@ -3,6 +3,9 @@ FROM docker-base COPY deps/vasclnt_*.deb deps/vasgp_*.deb /deps/ COPY user-override /etc/opt/quest/vas/user-override +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + ## Pre-install the fundamental packages ## Clean up RUN apt-get update && \ diff --git a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 index 0050cf9b1b..ffe7b6c573 100755 --- a/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 +++ b/platform/broadcom/docker-syncd-brcm/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY \ diff --git a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 index 9c66649420..45b71e8512 100755 --- a/platform/cavium/docker-syncd-cavm/Dockerfile.j2 +++ b/platform/cavium/docker-syncd-cavm/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY \ diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index d296ab4e82..cd686802f9 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update COPY \ diff --git a/platform/p4/docker-sonic-p4/Dockerfile.j2 b/platform/p4/docker-sonic-p4/Dockerfile.j2 index f285f8f075..97e3a56817 100644 --- a/platform/p4/docker-sonic-p4/Dockerfile.j2 +++ b/platform/p4/docker-sonic-p4/Dockerfile.j2 @@ -1,5 +1,8 @@ FROM docker-base +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update RUN apt-get install -y net-tools ethtool tcpdump ifupdown bridge-utils python-ply libqt5core5a libqt5network5 libboost-program-options1.55.0 libboost-system1.55.0 libboost-thread1.55.0 libgmp10 libjudydebian1 libnanomsg0 libdaemon0 libjansson4 libjemalloc1 diff --git a/sonic-slave/Dockerfile b/sonic-slave/Dockerfile index 0398581dcd..03f38a06c2 100644 --- a/sonic-slave/Dockerfile +++ b/sonic-slave/Dockerfile @@ -7,6 +7,9 @@ RUN echo "deb-src http://debian-archive.trafficmanager.net/debian/ jessie main c RUN echo "deb http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list RUN echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ jessie/updates main contrib non-free" >> /etc/apt/sources.list +## Make apt-get non-interactive +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get clean && apt-get update && apt-get install -y apt-utils default-jre-headless openssh-server curl wget unzip git build-essential libtool lintian RUN apt-get update && apt-get install -y sudo dh-make dh-exec kmod libtinyxml2-2 libboost-program-options1.55-dev libtinyxml2-dev python python-pip libncurses5-dev texinfo dh-autoreconf python3-pip