Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit cbabb3d

Browse files
committed
Avoid adding warnings to stderr
1 parent 80d894d commit cbabb3d

File tree

6 files changed

+53
-19
lines changed

6 files changed

+53
-19
lines changed

container-templates/docker-compose/.devcontainer/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111
# Debian and Ubuntu based images are supported. Alpine images are not yet supported.
1212
FROM debian:9
1313

14+
# Configure apt
15+
ENV DEBIAN_FRONTEND=noninteractive
16+
RUN apt-get update \
17+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
18+
1419
# Install git, process tools, lsb-release (common in install instructions for CLIs)
15-
RUN apt-get update && apt-get -y install git procps lsb-release
20+
RUN apt-get -y install git procps lsb-release
1621

1722
# *****************************************************
1823
# * Add steps for installing needed dependencies here *
@@ -22,4 +27,5 @@ RUN apt-get update && apt-get -y install git procps lsb-release
2227
RUN apt-get autoremove -y \
2328
&& apt-get clean -y \
2429
&& rm -rf /var/lib/apt/lists/*
30+
ENV DEBIAN_FRONTEND=dialog
2531

container-templates/dockerfile/.devcontainer/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
# Debian and Ubuntu based images are supported. Alpine images are not yet supported.
77
FROM debian:9
88

9+
# Configure apt
10+
ENV DEBIAN_FRONTEND=noninteractive
11+
RUN apt-get update \
12+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
13+
914
# Install git, process tools, lsb-release (common in install instructions for CLIs)
10-
RUN apt-get update && apt-get -y install git procps lsb-release
15+
RUN apt-get -y install git procps lsb-release
1116

1217
# *****************************************************
1318
# * Add steps for installing needed dependencies here *
@@ -17,4 +22,4 @@ RUN apt-get update && apt-get -y install git procps lsb-release
1722
RUN apt-get autoremove -y \
1823
&& apt-get clean -y \
1924
&& rm -rf /var/lib/apt/lists/*
20-
25+
ENV DEBIAN_FRONTEND=dialog

containers/azure-cli/.devcontainer/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@
55

66
FROM debian:9
77

8+
# Configure apt
9+
ENV DEBIAN_FRONTEND=noninteractive
10+
RUN apt-get update \
11+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
12+
813
# Install git, process tools
9-
RUN apt-get update && apt-get -y install git procps
14+
RUN apt-get -y install git procps
1015

1116
# Install the Azure CLI
1217
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
1318
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
14-
&& curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
19+
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
1520
&& apt-get update \
1621
&& apt-get install -y azure-cli
1722

1823
# Clean up
1924
RUN apt-get autoremove -y \
2025
&& apt-get clean -y \
2126
&& rm -rf /var/lib/apt/lists/*
27+
ENV DEBIAN_FRONTEND=dialog
28+
2229

containers/azure-terraform/.devcontainer/Dockerfile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
# Pick any base image, but if you select node, skip installing node. 😊
77
FROM debian:9
88

9-
# Install git, required tools
9+
# Configure apt
10+
ENV DEBIAN_FRONTEND=noninteractive
1011
RUN apt-get update \
11-
&& apt-get install -y \
12+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
13+
14+
# Install git, required tools
15+
RUN apt-get install -y \
1216
git \
1317
curl \
1418
procps \
@@ -17,26 +21,26 @@ RUN apt-get update \
1721
ca-certificates \
1822
gnupg-agent \
1923
software-properties-common \
20-
lsb-release
24+
lsb-release 2>&1
2125

2226
# [Optional] Install Node.js for Azure Cloud Shell support
2327
# Change the "lts/*" in the two lines below to pick a different version
24-
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash \
28+
RUN curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \
2529
&& /bin/bash -c "source $HOME/.nvm/nvm.sh \
2630
&& nvm install lts/* \
27-
&& nvm alias default lts/*"
31+
&& nvm alias default lts/*" 2>&1
2832

2933
# [Optional] For local testing instead of cloud shell
3034
# Install Docker CE CLI.
31-
RUN && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - \
35+
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
3236
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
3337
&& apt-get update \
3438
&& apt-get install -y docker-ce-cli
3539

3640
# [Optional] For local testing instead of cloud shell
3741
# Install the Azure CLI
38-
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
39-
&& curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
42+
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
43+
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
4044
&& apt-get update \
4145
&& apt-get install -y azure-cli
4246

@@ -55,4 +59,5 @@ RUN mkdir -p /tmp/docker-downloads \
5559
# Clean up
5660
RUN apt-get autoremove -y \
5761
&& apt-get clean -y \
58-
&& rm -rf /var/lib/apt/lists/*
62+
&& rm -rf /var/lib/apt/lists/*
63+
ENV DEBIAN_FRONTEND=dialog

containers/debian-9-git/.devcontainer/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
#-----------------------------------------------------------------------------------------
55
FROM debian:9
66

7-
# Install git, process tools
8-
RUN apt-get update && apt-get -y install git procps
7+
# Configure apt
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
RUN apt-get update \
10+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
11+
12+
# Install git, process tools, lsb-release (common in install instructions for CLIs)
13+
RUN apt-get -y install git procps lsb-release
914

1015
# Clean up
1116
RUN apt-get autoremove -y \
1217
&& apt-get clean -y \
1318
&& rm -rf /var/lib/apt/lists/*
14-
19+
ENV DEBIAN_FRONTEND=dialog

containers/ubuntu-18.04-git/.devcontainer/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@
44
#-----------------------------------------------------------------------------------------
55
FROM ubuntu:bionic
66

7-
# Install git, process tools
8-
RUN apt-get update && apt-get -y install git procps
7+
# Configure apt
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
RUN apt-get update \
10+
&& apt-get -y install --no-install-recommends apt-utils 2>&1
11+
12+
# Install git, process tools, lsb-release (common in install instructions for CLIs)
13+
RUN apt-get -y install git procps lsb-release
914

1015
# Clean up
1116
RUN apt-get autoremove -y \
1217
&& apt-get clean -y \
1318
&& rm -rf /var/lib/apt/lists/*
19+
ENV DEBIAN_FRONTEND=dialog
1420

0 commit comments

Comments
 (0)