Skip to content

Commit

Permalink
[All Dockerfiles]: Prevent apt asking questions on the console (#300)
Browse files Browse the repository at this point in the history
Add noninteractive setting into every Dockerfile in the repo

Signed-off-by: Pavel Shirshov pavelsh@microsoft.com
  • Loading branch information
pavel-shirshov authored and lguohan committed Feb 17, 2017
1 parent 8a24c05 commit a845740
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dockers/docker-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-basic_router/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-bgp/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-config-engine/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

# Dependencies for sonic-cfggen
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-database/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

COPY \
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-fpm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-lldp-sv2/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-lldp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-mlnx-sswsyncd/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-orchagent/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-platform-monitor/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-ptf-saithrift/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/"]
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-saiserver-brcm/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/"]
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-saiserver-mlnx/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/"]
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-snmp-sv2/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-snmp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-sswsyncd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; } && \
Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-teamd/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions dockers/docker-vas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
3 changes: 3 additions & 0 deletions platform/broadcom/docker-syncd-brcm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

COPY \
Expand Down
3 changes: 3 additions & 0 deletions platform/cavium/docker-syncd-cavm/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

COPY \
Expand Down
3 changes: 3 additions & 0 deletions platform/mellanox/docker-syncd-mlnx/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM docker-base

## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

COPY \
Expand Down
3 changes: 3 additions & 0 deletions platform/p4/docker-sonic-p4/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions sonic-slave/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a845740

Please sign in to comment.