-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} |