ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=20.04 |
ADD file:4809da414c2d478b4d991cbdaa2df457f2b3d07d0ff6cf673f09a66f90833e81 in / |
CMD ["/bin/bash"] |
ARG PS_VERSION=7.1.0 |
ARG PS_INSTALL_VERSION=7 |
COPY /opt/microsoft/powershell /opt/microsoft/powershell # buildkit |
ARG PS_INSTALL_VERSION=7 |
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/7-lts DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Ubuntu-20.04 |
RUN |3 PS_VERSION=7.2.16 PS_INSTALL_VERSION=7-lts PS_INSTALL_VERSION=7-lts /bin/sh -c apt-get update && apt-get install --no-install-recommends -y less locales ca-certificates gss-ntlmssp libicu66 libssl1.1 libc6 libgcc1 libgssapi-krb5-2 liblttng-ust0 libstdc++6 zlib1g openssh-client && apt-get dist-upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/* && locale-gen $LANG && update-locale # buildkit |
RUN |3 PS_VERSION=7.2.16 PS_INSTALL_VERSION=7-lts PS_INSTALL_VERSION=7-lts /bin/sh -c chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh && export POWERSHELL_TELEMETRY_OPTOUT=1 && pwsh -NoLogo -NoProfile -Command " \$ErrorActionPreference = 'Stop' ; \$ProgressPreference = 'SilentlyContinue' ; while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; Start-Sleep -Seconds 6 ; }" # buildkit |
CMD ["pwsh"] |
LABEL org.opencontainers.image.authors=marco.blessing@gmail.com |
ENV DEBIAN_FRONTEND=NonInteractive |
RUN /bin/sh -c apt-get update && apt-get -y install --no-install-recommends apt-utils 2>&1 && apt-get -y install --no-install-recommends git file curl && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* # buildkit |
ARG DOTNET=STS |
RUN |1 DOTNET=STS /bin/sh -c curl -L https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh && chmod +x /tmp/dotnet-install.sh && ./tmp/dotnet-install.sh --channel ${DOTNET} && rm -rf /tmp/dotnet-install.sh # buildkit |
ENV PATH=/root/.dotnet/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ARG PESTER |
ARG SCRIPTANALYZER |
ARG POSHGIT |
ARG PLATYPS |
ARG PSDKIT |
RUN |6 DOTNET=STS PESTER=5.3.1 SCRIPTANALYZER=1.20.0 POSHGIT=1.0.0 PLATYPS=0.14.0 PSDKIT=0.6.2 /bin/sh -c pwsh -NoLogo -NoProfile -NonInteractive -Command " \$Global:ProgressPreference = 'SilentlyContinue'; \$Global:VerbosePreference = 'Continue'; \$Global:ErrorActionPreference = 'Stop'; Install-Module -Name 'Pester' -RequiredVersion \$Env:PESTER -AllowClobber -Scope 'AllUsers' -Force; Install-Module -Name 'PSScriptAnalyzer' -RequiredVersion \$Env:SCRIPTANALYZER -AllowClobber -Scope 'AllUsers' -Force; Install-Module -Name 'posh-git' -RequiredVersion \$Env:POSHGIT -AllowClobber -Scope 'AllUsers' -Force; Install-Module -Name 'platyPS' -RequiredVersion \$Env:PLATYPS -AllowClobber -AllowPrerelease -Scope 'AllUsers' -Force; Install-Module -Name 'PsdKit' -RequiredVersion \$Env:PSDKIT -AllowClobber -AllowPrerelease -Scope 'AllUsers' -Force; " # buildkit |
COPY entrypoint/* /app/ # buildkit |
RUN |6 DOTNET=STS PESTER=5.3.1 SCRIPTANALYZER=1.20.0 POSHGIT=1.0.0 PLATYPS=0.14.0 PSDKIT=0.6.2 /bin/sh -c chmod -R 755 app/ # buildkit |
ENTRYPOINT ["/app/entrypoint.sh"] |
CMD ["pwsh"] |