|
| 1 | +FROM mcr.microsoft.com/powershell:7.4-ubuntu-22.04 |
| 2 | + |
| 3 | +# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350 |
| 4 | +ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1 |
| 5 | +ENV POWERSHELL_TELEMETRY_OPTOUT=1 |
| 6 | +ENV POWERSHELL_UPDATECHECK=Off |
| 7 | +ENV POWERSHELL_UPDATECHECK_OPTOUT=1 |
| 8 | +ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 |
| 9 | +ENV DOTNET_TELEMETRY_OPTOUT=1 |
| 10 | +ENV COMPlus_EnableDiagnostics=0 |
| 11 | + |
| 12 | +# Install Pester |
| 13 | +RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose' |
| 14 | +RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 5.0.0 -Force -ErrorAction Stop -Verbose' |
| 15 | + |
| 16 | +RUN set -eux; \ |
| 17 | + apt-get update; \ |
| 18 | + apt-get install -y git; \ |
| 19 | + rm -rf /var/lib/apt/lists/* |
| 20 | + |
| 21 | +# Install sops |
| 22 | +RUN set -eux; \ |
| 23 | + buildDeps="wget"; \ |
| 24 | + apt-get update; \ |
| 25 | + apt-get install --no-install-recommends -y $buildDeps; \ |
| 26 | + wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux > /usr/local/bin/sops; \ |
| 27 | + chmod +x /usr/local/bin/sops; \ |
| 28 | + sha256sum /usr/local/bin/sops | grep '^185348fd77fc160d5bdf3cd20ecbc796163504fd3df196d7cb29000773657b74 '; \ |
| 29 | + sops --version; \ |
| 30 | + apt-get purge --auto-remove -y $buildDeps; \ |
| 31 | + apt-get clean; \ |
| 32 | + rm -rf /var/lib/apt/lists/* |
| 33 | + |
| 34 | +# Install gnupg for sops |
| 35 | +RUN set -eux; \ |
| 36 | + apt-get update; \ |
| 37 | + apt-get install --no-install-recommends -y gnupg2; \ |
| 38 | + apt-get clean; \ |
| 39 | + rm -rf /var/lib/apt/lists/* |
| 40 | + |
| 41 | +COPY docker-entrypoint.sh /docker-entrypoint.sh |
| 42 | +RUN chmod +x docker-entrypoint.sh |
| 43 | + |
| 44 | +ENTRYPOINT [ "/docker-entrypoint.sh" ] |
0 commit comments