From cbabb3d7dd7dd3b622ccc158b6d94e42a080c2b6 Mon Sep 17 00:00:00 2001 From: Chuck Lantz Date: Mon, 22 Apr 2019 11:16:12 -0700 Subject: [PATCH] Avoid adding warnings to stderr --- .../docker-compose/.devcontainer/Dockerfile | 8 ++++++- .../dockerfile/.devcontainer/Dockerfile | 9 ++++++-- containers/azure-cli/.devcontainer/Dockerfile | 11 +++++++-- .../azure-terraform/.devcontainer/Dockerfile | 23 +++++++++++-------- .../debian-9-git/.devcontainer/Dockerfile | 11 ++++++--- .../ubuntu-18.04-git/.devcontainer/Dockerfile | 10 ++++++-- 6 files changed, 53 insertions(+), 19 deletions(-) diff --git a/container-templates/docker-compose/.devcontainer/Dockerfile b/container-templates/docker-compose/.devcontainer/Dockerfile index fdb56b6beb..7404669802 100644 --- a/container-templates/docker-compose/.devcontainer/Dockerfile +++ b/container-templates/docker-compose/.devcontainer/Dockerfile @@ -11,8 +11,13 @@ # Debian and Ubuntu based images are supported. Alpine images are not yet supported. FROM debian:9 +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + # Install git, process tools, lsb-release (common in install instructions for CLIs) -RUN apt-get update && apt-get -y install git procps lsb-release +RUN apt-get -y install git procps lsb-release # ***************************************************** # * Add steps for installing needed dependencies here * @@ -22,4 +27,5 @@ RUN apt-get update && apt-get -y install git procps lsb-release RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog diff --git a/container-templates/dockerfile/.devcontainer/Dockerfile b/container-templates/dockerfile/.devcontainer/Dockerfile index 23cf3faa90..f6fe8d71e4 100644 --- a/container-templates/dockerfile/.devcontainer/Dockerfile +++ b/container-templates/dockerfile/.devcontainer/Dockerfile @@ -6,8 +6,13 @@ # Debian and Ubuntu based images are supported. Alpine images are not yet supported. FROM debian:9 +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + # Install git, process tools, lsb-release (common in install instructions for CLIs) -RUN apt-get update && apt-get -y install git procps lsb-release +RUN apt-get -y install git procps lsb-release # ***************************************************** # * Add steps for installing needed dependencies here * @@ -17,4 +22,4 @@ RUN apt-get update && apt-get -y install git procps lsb-release RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* - +ENV DEBIAN_FRONTEND=dialog diff --git a/containers/azure-cli/.devcontainer/Dockerfile b/containers/azure-cli/.devcontainer/Dockerfile index bb3dc58a3f..bc85d74bb3 100644 --- a/containers/azure-cli/.devcontainer/Dockerfile +++ b/containers/azure-cli/.devcontainer/Dockerfile @@ -5,13 +5,18 @@ FROM debian:9 +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + # Install git, process tools -RUN apt-get update && apt-get -y install git procps +RUN apt-get -y install git procps # Install the Azure CLI RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \ && echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ - && curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ + && curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \ && apt-get update \ && apt-get install -y azure-cli @@ -19,4 +24,6 @@ RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \ RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog + diff --git a/containers/azure-terraform/.devcontainer/Dockerfile b/containers/azure-terraform/.devcontainer/Dockerfile index 6263a8784c..86622fa5ad 100644 --- a/containers/azure-terraform/.devcontainer/Dockerfile +++ b/containers/azure-terraform/.devcontainer/Dockerfile @@ -6,9 +6,13 @@ # Pick any base image, but if you select node, skip installing node. 😊 FROM debian:9 -# Install git, required tools +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ - && apt-get install -y \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + +# Install git, required tools +RUN apt-get install -y \ git \ curl \ procps \ @@ -17,26 +21,26 @@ RUN apt-get update \ ca-certificates \ gnupg-agent \ software-properties-common \ - lsb-release + lsb-release 2>&1 # [Optional] Install Node.js for Azure Cloud Shell support # Change the "lts/*" in the two lines below to pick a different version -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \ +RUN curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \ && /bin/bash -c "source $HOME/.nvm/nvm.sh \ && nvm install lts/* \ - && nvm alias default lts/*" + && nvm alias default lts/*" 2>&1 # [Optional] For local testing instead of cloud shell # Install Docker CE CLI. -RUN && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \ +RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \ && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \ && apt-get update \ && apt-get install -y docker-ce-cli # [Optional] For local testing instead of cloud shell # Install the Azure CLI -RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ - && curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ +RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \ + && curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \ && apt-get update \ && apt-get install -y azure-cli @@ -55,4 +59,5 @@ RUN mkdir -p /tmp/docker-downloads \ # Clean up RUN apt-get autoremove -y \ && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* \ No newline at end of file + && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog \ No newline at end of file diff --git a/containers/debian-9-git/.devcontainer/Dockerfile b/containers/debian-9-git/.devcontainer/Dockerfile index f75e9177e8..739a52bceb 100644 --- a/containers/debian-9-git/.devcontainer/Dockerfile +++ b/containers/debian-9-git/.devcontainer/Dockerfile @@ -4,11 +4,16 @@ #----------------------------------------------------------------------------------------- FROM debian:9 -# Install git, process tools -RUN apt-get update && apt-get -y install git procps +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + +# Install git, process tools, lsb-release (common in install instructions for CLIs) +RUN apt-get -y install git procps lsb-release # Clean up RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* - +ENV DEBIAN_FRONTEND=dialog diff --git a/containers/ubuntu-18.04-git/.devcontainer/Dockerfile b/containers/ubuntu-18.04-git/.devcontainer/Dockerfile index 5277dde2a4..7dc6386320 100644 --- a/containers/ubuntu-18.04-git/.devcontainer/Dockerfile +++ b/containers/ubuntu-18.04-git/.devcontainer/Dockerfile @@ -4,11 +4,17 @@ #----------------------------------------------------------------------------------------- FROM ubuntu:bionic -# Install git, process tools -RUN apt-get update && apt-get -y install git procps +# Configure apt +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils 2>&1 + +# Install git, process tools, lsb-release (common in install instructions for CLIs) +RUN apt-get -y install git procps lsb-release # Clean up RUN apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +ENV DEBIAN_FRONTEND=dialog