Skip to content

Commit

Permalink
Enhancement: Disable powershell startup telemetry, startup update che…
Browse files Browse the repository at this point in the history
…ck, and diagnostics in all variants

Since powershell 7.0, on shell initialization, telemetry is sent by default. Update check slows down shell initialization. Diagnostics is generally unneeded.

Now these are disabled.
  • Loading branch information
leojonathanoh committed Nov 8, 2021
1 parent ba27f6d commit 90384fd
Show file tree
Hide file tree
Showing 23 changed files with 210 additions and 11 deletions.
17 changes: 12 additions & 5 deletions generate/templates/Dockerfile.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
@"
FROM mcr.microsoft.com/powershell:$( $VARIANT['_metadata']['base_image_tag'] )
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0
"@

Expand All @@ -17,7 +26,7 @@ RUN apk add --no-cache git
}
'sops' {

@"
@"
# Note: `sops` does not provide binaries for other arch other than `linux/i386` and `linux/amd64`. So `sops` might not work on other architectures.
RUN wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops
Expand All @@ -34,7 +43,7 @@ RUN apk add --no-cache gnupg
}elseif ( $VARIANT['_metadata']['base_image_tag'] -match '\bubuntu\b' ) {
switch ($component) {
'git' {
@"
@"
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -43,15 +52,13 @@ RUN apt-get update \
"@
}
'sops' {

@"
@"
# Note: `sops` does not provide binaries for other arch other than `linux/i386` and `linux/amd64`. So `sops` might not work on other architectures.
RUN apt-get update \
&& apt-get install -y wget \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
10 changes: 9 additions & 1 deletion variants/6.0.2-ubuntu-16.04-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:6.0.2-ubuntu-16.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/6.0.2-ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:6.0.2-ubuntu-16.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

9 changes: 9 additions & 0 deletions variants/6.1.3-alpine-3.8-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:6.1.3-alpine-3.8

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apk add --no-cache git

# Note: sops does not provide binaries for other arch other than linux/i386 and linux/amd64. So sops might not work on other architectures.
Expand Down
9 changes: 9 additions & 0 deletions variants/6.1.3-alpine-3.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:6.1.3-alpine-3.8

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

10 changes: 9 additions & 1 deletion variants/6.1.3-ubuntu-18.04-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:6.1.3-ubuntu-18.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/6.1.3-ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:6.1.3-ubuntu-18.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

9 changes: 9 additions & 0 deletions variants/6.2.4-alpine-3.8-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:6.2.4-alpine-3.8

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apk add --no-cache git

# Note: sops does not provide binaries for other arch other than linux/i386 and linux/amd64. So sops might not work on other architectures.
Expand Down
9 changes: 9 additions & 0 deletions variants/6.2.4-alpine-3.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:6.2.4-alpine-3.8

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

10 changes: 9 additions & 1 deletion variants/6.2.4-ubuntu-18.04-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:6.2.4-ubuntu-18.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/6.2.4-ubuntu-18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:6.2.4-ubuntu-18.04

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

9 changes: 9 additions & 0 deletions variants/7.0.3-alpine-3.9-20200928-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.0.3-alpine-3.9-20200928

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apk add --no-cache git

# Note: sops does not provide binaries for other arch other than linux/i386 and linux/amd64. So sops might not work on other architectures.
Expand Down
9 changes: 9 additions & 0 deletions variants/7.0.3-alpine-3.9-20200928/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.0.3-alpine-3.9-20200928

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

10 changes: 9 additions & 1 deletion variants/7.0.3-ubuntu-18.04-20201027-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.0.3-ubuntu-18.04-20201027

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/7.0.3-ubuntu-18.04-20201027/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.0.3-ubuntu-18.04-20201027

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

9 changes: 9 additions & 0 deletions variants/7.1.5-alpine-3.13-20211021-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.1.5-alpine-3.13-20211021

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apk add --no-cache git

# Note: sops does not provide binaries for other arch other than linux/i386 and linux/amd64. So sops might not work on other architectures.
Expand Down
9 changes: 9 additions & 0 deletions variants/7.1.5-alpine-3.13-20211021/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.1.5-alpine-3.13-20211021

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

10 changes: 9 additions & 1 deletion variants/7.1.5-ubuntu-20.04-20211021-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.1.5-ubuntu-20.04-20211021

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/7.1.5-ubuntu-20.04-20211021/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.1.5-ubuntu-20.04-20211021

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

9 changes: 9 additions & 0 deletions variants/7.2.0-alpine-3.14-20211102-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.2.0-alpine-3.14-20211102

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apk add --no-cache git

# Note: sops does not provide binaries for other arch other than linux/i386 and linux/amd64. So sops might not work on other architectures.
Expand Down
9 changes: 9 additions & 0 deletions variants/7.2.0-alpine-3.14-20211102/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.2.0-alpine-3.14-20211102

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

10 changes: 9 additions & 1 deletion variants/7.2.0-ubuntu-20.04-20211102-git-sops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
FROM mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04-20211102

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -10,7 +19,6 @@ RUN apt-get update \
&& wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops && chmod +x /usr/local/bin/sops \
&& rm -rf /var/lib/apt/lists/*


RUN apt-get update \
&& (apt-get install -y gpg || apt-get install -y gpgv2) \
&& rm -rf /var/lib/apt/lists/*
Expand Down
9 changes: 9 additions & 0 deletions variants/7.2.0-ubuntu-20.04-20211102/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM mcr.microsoft.com/powershell:7.2.0-ubuntu-20.04-20211102

# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
ENV POWERSHELL_TELEMETRY_OPTOUT=1
ENV POWERSHELL_UPDATECHECK=Off
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
ENV DOTNET_TELEMETRY_OPTOUT=1
ENV COMPlus_EnableDiagnostics=0

0 comments on commit 90384fd

Please sign in to comment.