diff --git a/release/7-2/ubuntu20.04-arm64/docker/Dockerfile b/release/7-2/ubuntu20.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..45b1e07a9 --- /dev/null +++ b/release/7-2/ubuntu20.04-arm64/docker/Dockerfile @@ -0,0 +1,65 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +FROM --platform=linux/arm64/v8 ubuntu:focal AS installer-env + + ARG PS_VERSION=7.2.18 + ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz + ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} + ARG PS_INSTALL_VERSION=7 + + # define the folder we will be installing PowerShell to + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION + # Create the install folder + RUN mkdir -p ${PS_INSTALL_FOLDER} + ARG PS_PACKAGE_URL_BASE64 + RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes + RUN update-ca-certificates -f + RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' + RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz + RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +FROM --platform=linux/arm64/v8 ubuntu:focal AS final-image + + # Define Args and Env needed to create links + ARG PS_INSTALL_VERSION=7 + ARG PS_VERSION=7.2.18 + + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04 + # Copy only the files we need from the previous stage + COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] + RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes + + # Give all user execute permissions and remove write permissions for others + RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh + + # Use PowerShell as the default shell + # Use array to avoid Docker prepending /bin/sh -c + CMD [ "pwsh" ] diff --git a/release/7-2/ubuntu20.04-arm64/meta.json b/release/7-2/ubuntu20.04-arm64/meta.json new file mode 100644 index 000000000..ce3c98b2f --- /dev/null +++ b/release/7-2/ubuntu20.04-arm64/meta.json @@ -0,0 +1,26 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 20.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "tagTemplates": [ + "#psversion#-ubuntu-#shorttag#-arm64", + "ubuntu-#shorttag#-arm64" + ], + "shortTags": [ + {"Tag": "focal"}, + {"Tag": "20.04"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-2/ubuntu22.04-arm64/docker/Dockerfile b/release/7-2/ubuntu22.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..a4bc057b6 --- /dev/null +++ b/release/7-2/ubuntu22.04-arm64/docker/Dockerfile @@ -0,0 +1,70 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +FROM --platform=linux/arm64/v8 ubuntu:jammy AS installer-env + + ARG PS_VERSION=7.2.18 + ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz + ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} + ARG PS_INSTALL_VERSION=7 + + # define the folder we will be installing PowerShell to + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION + + # Create the install folder + RUN mkdir -p ${PS_INSTALL_FOLDER} + + ARG PS_PACKAGE_URL_BASE64 + + RUN apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes + + RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' + + RUN ls -l /tmp/powershell.tar.gz + + # Unzip the Linux tar.gz + RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +FROM --platform=linux/arm64/v8 ubuntu:jammy AS final-image + + # Define Args and Env needed to create links + ARG PS_INSTALL_VERSION=7 + ARG PS_VERSION=7.2.18 + + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04 + + # Copy only the files we need from the previous stage + COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] + + + RUN \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libunwind8 libssl3 libicu70 less --yes + + # Give all user execute permissions and remove write permissions for others + RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh + + # Use PowerShell as the default shell + # Use array to avoid Docker prepending /bin/sh -c + CMD [ "pwsh" ] diff --git a/release/7-2/ubuntu22.04-arm64/meta.json b/release/7-2/ubuntu22.04-arm64/meta.json new file mode 100644 index 000000000..a5186ee01 --- /dev/null +++ b/release/7-2/ubuntu22.04-arm64/meta.json @@ -0,0 +1,29 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 22.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "tagTemplates": [ + "#psversion#-ubuntu-#shorttag#-arm64", + "ubuntu-#shorttag#-arm64" + ], + "shortTags": [ + {"Tag": "jammy"}, + {"Tag": "22.04"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "manifestLists": [ + "${channelTag}" + ], + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-3/ubuntu20.04-arm64/docker/Dockerfile b/release/7-3/ubuntu20.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..a86cd326d --- /dev/null +++ b/release/7-3/ubuntu20.04-arm64/docker/Dockerfile @@ -0,0 +1,65 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS installer-env + + ARG PS_VERSION=7.3.11 + ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz + ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} + ARG PS_INSTALL_VERSION=7-preview + # define the folder we will be installing PowerShell to + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION + # Create the install folder + RUN mkdir -p ${PS_INSTALL_FOLDER} + ARG PS_PACKAGE_URL_BASE64 + RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes + RUN update-ca-certificates -f + RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' + RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz + RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS final-image + + # Define Args and Env needed to create links + ARG PS_INSTALL_VERSION=7-preview + ARG PS_VERSION=7.3.11 + ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04 + # Copy only the files we need from the previous stage + COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] + RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes + # Give all user execute permissions and remove write permissions for others + RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview + # Use PowerShell as the default shell + # Use array to avoid Docker prepending /bin/sh -c + CMD [ "pwsh" ] diff --git a/release/7-3/ubuntu20.04-arm64/meta.json b/release/7-3/ubuntu20.04-arm64/meta.json new file mode 100644 index 000000000..c86a6bbb4 --- /dev/null +++ b/release/7-3/ubuntu20.04-arm64/meta.json @@ -0,0 +1,22 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 20.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "focal-arm64"}, + {"Tag": "20.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-3/ubuntu22.04-arm64/docker/Dockerfile b/release/7-3/ubuntu22.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..608fb3b80 --- /dev/null +++ b/release/7-3/ubuntu22.04-arm64/docker/Dockerfile @@ -0,0 +1,63 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS installer-env + +ARG PS_VERSION=7.3.11 +ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz +ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} +ARG PS_INSTALL_VERSION=7-preview + +# define the folder we will be installing PowerShell to +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION +# Create the install folder +RUN mkdir -p ${PS_INSTALL_FOLDER} +ARG PS_PACKAGE_URL_BASE64 +RUN apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes +RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' +RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz +RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS final-image + +# Define Args and Env needed to create links +ARG PS_INSTALL_VERSION=7-preview +ARG PS_VERSION=7.3.11 +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04 +# Copy only the files we need from the previous stage +COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] +RUN \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl3 libicu70 less --yes + # Give all user execute permissions and remove write permissions for others +RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview +# Use PowerShell as the default shell +# Use array to avoid Docker prepending /bin/sh -c +CMD [ "pwsh" ] diff --git a/release/7-3/ubuntu22.04-arm64/meta.json b/release/7-3/ubuntu22.04-arm64/meta.json new file mode 100644 index 000000000..fb2ea5309 --- /dev/null +++ b/release/7-3/ubuntu22.04-arm64/meta.json @@ -0,0 +1,25 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 22.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "jammy-arm64"}, + {"Tag": "22.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "manifestLists": [ + "${channelTag}" + ], + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-4/ubuntu20.04-arm64/docker/Dockerfile b/release/7-4/ubuntu20.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..144723a5d --- /dev/null +++ b/release/7-4/ubuntu20.04-arm64/docker/Dockerfile @@ -0,0 +1,65 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS installer-env + +ARG PS_VERSION=7.4.1 +ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz +ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} +ARG PS_INSTALL_VERSION=7-preview +# define the folder we will be installing PowerShell to +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION +# Create the install folder +RUN mkdir -p ${PS_INSTALL_FOLDER} +ARG PS_PACKAGE_URL_BASE64 +RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes +RUN update-ca-certificates -f +RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' +RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz +RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS final-image + +# Define Args and Env needed to create links +ARG PS_INSTALL_VERSION=7-preview +ARG PS_VERSION=7.4.1 +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04 +# Copy only the files we need from the previous stage +COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] +RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes + # Give all user execute permissions and remove write permissions for others +RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview +# Use PowerShell as the default shell +# Use array to avoid Docker prepending /bin/sh -c +CMD [ "pwsh" ] diff --git a/release/7-4/ubuntu20.04-arm64/meta.json b/release/7-4/ubuntu20.04-arm64/meta.json new file mode 100644 index 000000000..c86a6bbb4 --- /dev/null +++ b/release/7-4/ubuntu20.04-arm64/meta.json @@ -0,0 +1,22 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 20.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "focal-arm64"}, + {"Tag": "20.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-4/ubuntu22.04-arm64/docker/Dockerfile b/release/7-4/ubuntu22.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..267264a73 --- /dev/null +++ b/release/7-4/ubuntu22.04-arm64/docker/Dockerfile @@ -0,0 +1,62 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS installer-env + +ARG PS_VERSION=7.4.1 +ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz +ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} +ARG PS_INSTALL_VERSION=7-preview + +# define the folder we will be installing PowerShell to +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION +# Create the install folder +RUN mkdir -p ${PS_INSTALL_FOLDER} +ARG PS_PACKAGE_URL_BASE64 +RUN apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes +RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' +RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz +RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS final-image + +# Define Args and Env needed to create links +ARG PS_INSTALL_VERSION=7-preview +ARG PS_VERSION=7.4.1 +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04 +# Copy only the files we need from the previous stage +COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] +RUN \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl3 libicu70 less --yes + # Give all user execute permissions and remove write permissions for others +RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview +# Use PowerShell as the default shell +# Use array to avoid Docker prepending /bin/sh -c +CMD [ "pwsh" ] diff --git a/release/7-4/ubuntu22.04-arm64/meta.json b/release/7-4/ubuntu22.04-arm64/meta.json new file mode 100644 index 000000000..fb2ea5309 --- /dev/null +++ b/release/7-4/ubuntu22.04-arm64/meta.json @@ -0,0 +1,25 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 22.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "jammy-arm64"}, + {"Tag": "22.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "manifestLists": [ + "${channelTag}" + ], + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-5/ubuntu20.04-arm64/docker/Dockerfile b/release/7-5/ubuntu20.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..144723a5d --- /dev/null +++ b/release/7-5/ubuntu20.04-arm64/docker/Dockerfile @@ -0,0 +1,65 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS installer-env + +ARG PS_VERSION=7.4.1 +ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz +ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} +ARG PS_INSTALL_VERSION=7-preview +# define the folder we will be installing PowerShell to +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION +# Create the install folder +RUN mkdir -p ${PS_INSTALL_FOLDER} +ARG PS_PACKAGE_URL_BASE64 +RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes +RUN update-ca-certificates -f +RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' +RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz +RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS final-image + +# Define Args and Env needed to create links +ARG PS_INSTALL_VERSION=7-preview +ARG PS_VERSION=7.4.1 +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04 +# Copy only the files we need from the previous stage +COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] +RUN --mount=type=cache,target=/var/lib/apt \ + --mount=type=cache,target=/var/cache/apt \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes + # Give all user execute permissions and remove write permissions for others +RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview +# Use PowerShell as the default shell +# Use array to avoid Docker prepending /bin/sh -c +CMD [ "pwsh" ] diff --git a/release/7-5/ubuntu20.04-arm64/meta.json b/release/7-5/ubuntu20.04-arm64/meta.json new file mode 100644 index 000000000..c86a6bbb4 --- /dev/null +++ b/release/7-5/ubuntu20.04-arm64/meta.json @@ -0,0 +1,22 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 20.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "focal-arm64"}, + {"Tag": "20.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +} diff --git a/release/7-5/ubuntu22.04-arm64/docker/Dockerfile b/release/7-5/ubuntu22.04-arm64/docker/Dockerfile new file mode 100644 index 000000000..267264a73 --- /dev/null +++ b/release/7-5/ubuntu22.04-arm64/docker/Dockerfile @@ -0,0 +1,62 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS installer-env + +ARG PS_VERSION=7.4.1 +ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz +ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} +ARG PS_INSTALL_VERSION=7-preview + +# define the folder we will be installing PowerShell to +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION +# Create the install folder +RUN mkdir -p ${PS_INSTALL_FOLDER} +ARG PS_PACKAGE_URL_BASE64 +RUN apt-get update \ + && apt-get install --no-install-recommends ca-certificates wget --yes +RUN echo 'in task' \ + && if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \ + echo 'using base64' \ + && export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\ + else \ + echo 'using unencoded' \ + && export url="${PS_PACKAGE_URL}"; \ + fi \ + && echo "url: $url" \ + && wget -O /tmp/powershell.tar.gz "$url" \ + && echo 'task done' +RUN ls -l /tmp/powershell.tar.gz + # Unzip the Linux tar.gz +RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER} + +ARG hostRegistry=psdockercache.azurecr.io +FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS final-image + +# Define Args and Env needed to create links +ARG PS_INSTALL_VERSION=7-preview +ARG PS_VERSION=7.4.1 +ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ + \ + # Define ENVs for Localization/Globalization + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ + LC_ALL=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + # set a fixed location for the Module analysis cache + PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \ + POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04 +# Copy only the files we need from the previous stage +COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"] +RUN \ + apt-get update \ + && apt-get install --no-install-recommends ca-certificates libssl3 libicu70 less --yes + # Give all user execute permissions and remove write permissions for others +RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \ + # Create the pwsh symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \ + # Create the pwsh-preview symbolic link that points to powershell + && ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview +# Use PowerShell as the default shell +# Use array to avoid Docker prepending /bin/sh -c +CMD [ "pwsh" ] diff --git a/release/7-5/ubuntu22.04-arm64/meta.json b/release/7-5/ubuntu22.04-arm64/meta.json new file mode 100644 index 000000000..fb2ea5309 --- /dev/null +++ b/release/7-5/ubuntu22.04-arm64/meta.json @@ -0,0 +1,25 @@ +{ + "IsLinux" : true, + "UseLinuxVersion": false, + "PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz", + "osVersion": "Ubuntu 22.04 ARM 64v8", + "SkipGssNtlmSspTests": true, + "ShortDistroName": "ubuntu", + "Base64EncodePackageUrl": true, + "UseAcr": false, + "shortTags": [ + {"Tag": "jammy-arm64"}, + {"Tag": "22.04-arm64"} + ], + "TestProperties": { + "size": 550, + "Arm64": true + }, + "manifestLists": [ + "${channelTag}" + ], + "EndOfLife": "2023-04-02", + "DistributionState": "Validated", + "UseInCi": false, + "Architecture": "arm64" +}