Skip to content

Commit 103b1f9

Browse files
committed
Add ubuntu-based arm64 image
1 parent 7ed1970 commit 103b1f9

File tree

16 files changed

+713
-0
lines changed

16 files changed

+713
-0
lines changed

Diff for: release/7-2/ubuntu20.04-arm64/docker/Dockerfile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
FROM --platform=linux/arm64/v8 ubuntu:focal AS installer-env
5+
6+
ARG PS_VERSION=7.2.3
7+
ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz
8+
ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
9+
ARG PS_INSTALL_VERSION=7
10+
11+
# define the folder we will be installing PowerShell to
12+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
13+
# Create the install folder
14+
RUN mkdir -p ${PS_INSTALL_FOLDER}
15+
ARG PS_PACKAGE_URL_BASE64
16+
RUN --mount=type=cache,target=/var/lib/apt \
17+
--mount=type=cache,target=/var/cache/apt \
18+
apt-get update \
19+
&& apt-get install --no-install-recommends ca-certificates wget --yes
20+
RUN update-ca-certificates -f
21+
RUN echo 'in task' \
22+
&& if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \
23+
echo 'using base64' \
24+
&& export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\
25+
else \
26+
echo 'using unencoded' \
27+
&& export url="${PS_PACKAGE_URL}"; \
28+
fi \
29+
&& echo "url: $url" \
30+
&& wget -O /tmp/powershell.tar.gz "$url" \
31+
&& echo 'task done'
32+
RUN ls -l /tmp/powershell.tar.gz
33+
# Unzip the Linux tar.gz
34+
RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER}
35+
36+
FROM --platform=linux/arm64/v8 ubuntu:focal AS final-image
37+
38+
# Define Args and Env needed to create links
39+
ARG PS_INSTALL_VERSION=7
40+
ARG PS_VERSION=7.2.3
41+
42+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
43+
\
44+
# Define ENVs for Localization/Globalization
45+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
46+
LC_ALL=en_US.UTF-8 \
47+
LANG=en_US.UTF-8 \
48+
# set a fixed location for the Module analysis cache
49+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
50+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04
51+
# Copy only the files we need from the previous stage
52+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
53+
RUN --mount=type=cache,target=/var/lib/apt \
54+
--mount=type=cache,target=/var/cache/apt \
55+
apt-get update \
56+
&& apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes
57+
58+
# Give all user execute permissions and remove write permissions for others
59+
RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
60+
# Create the pwsh symbolic link that points to powershell
61+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh
62+
63+
# Use PowerShell as the default shell
64+
# Use array to avoid Docker prepending /bin/sh -c
65+
CMD [ "pwsh" ]

Diff for: release/7-2/ubuntu20.04-arm64/meta.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz",
5+
"osVersion": "Ubuntu 20.04 ARM 64v8",
6+
"SkipGssNtlmSspTests": true,
7+
"ShortDistroName": "ubuntu",
8+
"Base64EncodePackageUrl": true,
9+
"UseAcr": false,
10+
"tagTemplates": [
11+
"#psversion#-ubuntu-#shorttag#-arm64",
12+
"ubuntu-#shorttag#-arm64"
13+
],
14+
"shortTags": [
15+
{"Tag": "focal"},
16+
{"Tag": "20.04"}
17+
],
18+
"TestProperties": {
19+
"size": 550,
20+
"Arm64": true
21+
},
22+
"EndOfLife": "2023-04-02",
23+
"DistributionState": "Validated",
24+
"UseInCi": false,
25+
"Architecture": "arm64"
26+
}

Diff for: release/7-2/ubuntu22.04-arm64/docker/Dockerfile

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
FROM --platform=linux/arm64/v8 ubuntu:jammy AS installer-env
5+
6+
ARG PS_VERSION=7.2.4
7+
ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz
8+
ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
9+
ARG PS_INSTALL_VERSION=7
10+
11+
# define the folder we will be installing PowerShell to
12+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
13+
14+
# Create the install folder
15+
RUN mkdir -p ${PS_INSTALL_FOLDER}
16+
17+
ARG PS_PACKAGE_URL_BASE64
18+
19+
RUN apt-get update \
20+
&& apt-get install --no-install-recommends ca-certificates wget --yes
21+
22+
RUN echo 'in task' \
23+
&& if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \
24+
echo 'using base64' \
25+
&& export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\
26+
else \
27+
echo 'using unencoded' \
28+
&& export url="${PS_PACKAGE_URL}"; \
29+
fi \
30+
&& echo "url: $url" \
31+
&& wget -O /tmp/powershell.tar.gz "$url" \
32+
&& echo 'task done'
33+
34+
RUN ls -l /tmp/powershell.tar.gz
35+
36+
# Unzip the Linux tar.gz
37+
RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER}
38+
39+
FROM --platform=linux/arm64/v8 ubuntu:jammy AS final-image
40+
41+
# Define Args and Env needed to create links
42+
ARG PS_INSTALL_VERSION=7
43+
ARG PS_VERSION=7.2.4
44+
45+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
46+
\
47+
# Define ENVs for Localization/Globalization
48+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
49+
LC_ALL=en_US.UTF-8 \
50+
LANG=en_US.UTF-8 \
51+
# set a fixed location for the Module analysis cache
52+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
53+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04
54+
55+
# Copy only the files we need from the previous stage
56+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
57+
58+
59+
RUN \
60+
apt-get update \
61+
&& apt-get install --no-install-recommends ca-certificates libunwind8 libssl3 libicu70 less --yes
62+
63+
# Give all user execute permissions and remove write permissions for others
64+
RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
65+
# Create the pwsh symbolic link that points to powershell
66+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh
67+
68+
# Use PowerShell as the default shell
69+
# Use array to avoid Docker prepending /bin/sh -c
70+
CMD [ "pwsh" ]

Diff for: release/7-2/ubuntu22.04-arm64/meta.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz",
5+
"osVersion": "Ubuntu 22.04 ARM 64v8",
6+
"SkipGssNtlmSspTests": true,
7+
"ShortDistroName": "ubuntu",
8+
"Base64EncodePackageUrl": true,
9+
"UseAcr": false,
10+
"tagTemplates": [
11+
"#psversion#-ubuntu-#shorttag#-arm64",
12+
"ubuntu-#shorttag#-arm64"
13+
],
14+
"shortTags": [
15+
{"Tag": "jammy"},
16+
{"Tag": "22.04"}
17+
],
18+
"TestProperties": {
19+
"size": 550,
20+
"Arm64": true
21+
},
22+
"manifestLists": [
23+
"${channelTag}"
24+
],
25+
"EndOfLife": "2023-04-02",
26+
"DistributionState": "Validated",
27+
"UseInCi": false,
28+
"Architecture": "arm64"
29+
}

Diff for: release/7-3/ubuntu20.04-arm64/docker/Dockerfile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
ARG hostRegistry=psdockercache.azurecr.io
5+
FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS installer-env
6+
7+
ARG PS_VERSION=7.3.0-preview.3
8+
ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz
9+
ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
10+
ARG PS_INSTALL_VERSION=7-preview
11+
# define the folder we will be installing PowerShell to
12+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
13+
# Create the install folder
14+
RUN mkdir -p ${PS_INSTALL_FOLDER}
15+
ARG PS_PACKAGE_URL_BASE64
16+
RUN --mount=type=cache,target=/var/lib/apt \
17+
--mount=type=cache,target=/var/cache/apt \
18+
apt-get update \
19+
&& apt-get install --no-install-recommends ca-certificates wget --yes
20+
RUN update-ca-certificates -f
21+
RUN echo 'in task' \
22+
&& if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \
23+
echo 'using base64' \
24+
&& export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\
25+
else \
26+
echo 'using unencoded' \
27+
&& export url="${PS_PACKAGE_URL}"; \
28+
fi \
29+
&& echo "url: $url" \
30+
&& wget -O /tmp/powershell.tar.gz "$url" \
31+
&& echo 'task done'
32+
RUN ls -l /tmp/powershell.tar.gz
33+
# Unzip the Linux tar.gz
34+
RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER}
35+
36+
ARG hostRegistry=psdockercache.azurecr.io
37+
FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:focal AS final-image
38+
39+
# Define Args and Env needed to create links
40+
ARG PS_INSTALL_VERSION=7-preview
41+
ARG PS_VERSION=7.3.0-preview.3
42+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
43+
\
44+
# Define ENVs for Localization/Globalization
45+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
46+
LC_ALL=en_US.UTF-8 \
47+
LANG=en_US.UTF-8 \
48+
# set a fixed location for the Module analysis cache
49+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
50+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-20.04
51+
# Copy only the files we need from the previous stage
52+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
53+
RUN --mount=type=cache,target=/var/lib/apt \
54+
--mount=type=cache,target=/var/cache/apt \
55+
apt-get update \
56+
&& apt-get install --no-install-recommends ca-certificates libssl1.1 libicu66 less --yes
57+
# Give all user execute permissions and remove write permissions for others
58+
RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
59+
# Create the pwsh symbolic link that points to powershell
60+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \
61+
# Create the pwsh-preview symbolic link that points to powershell
62+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview
63+
# Use PowerShell as the default shell
64+
# Use array to avoid Docker prepending /bin/sh -c
65+
CMD [ "pwsh" ]

Diff for: release/7-3/ubuntu20.04-arm64/meta.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz",
5+
"osVersion": "Ubuntu 20.04 ARM 64v8",
6+
"SkipGssNtlmSspTests": true,
7+
"ShortDistroName": "ubuntu",
8+
"Base64EncodePackageUrl": true,
9+
"UseAcr": false,
10+
"shortTags": [
11+
{"Tag": "focal-arm64"},
12+
{"Tag": "20.04-arm64"}
13+
],
14+
"TestProperties": {
15+
"size": 550,
16+
"Arm64": true
17+
},
18+
"EndOfLife": "2023-04-02",
19+
"DistributionState": "Validated",
20+
"UseInCi": false,
21+
"Architecture": "arm64"
22+
}

Diff for: release/7-3/ubuntu22.04-arm64/docker/Dockerfile

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
5+
ARG hostRegistry=psdockercache.azurecr.io
6+
FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS installer-env
7+
8+
ARG PS_VERSION=7.3.0-preview.4
9+
ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm64.tar.gz
10+
ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
11+
ARG PS_INSTALL_VERSION=7-preview
12+
13+
# define the folder we will be installing PowerShell to
14+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
15+
# Create the install folder
16+
RUN mkdir -p ${PS_INSTALL_FOLDER}
17+
ARG PS_PACKAGE_URL_BASE64
18+
RUN apt-get update \
19+
&& apt-get install --no-install-recommends ca-certificates wget --yes
20+
RUN echo 'in task' \
21+
&& if [ -n "${PS_PACKAGE_URL_BASE64}" ]; then \
22+
echo 'using base64' \
23+
&& export url=$(echo "${PS_PACKAGE_URL_BASE64}" | base64 --decode -);\
24+
else \
25+
echo 'using unencoded' \
26+
&& export url="${PS_PACKAGE_URL}"; \
27+
fi \
28+
&& echo "url: $url" \
29+
&& wget -O /tmp/powershell.tar.gz "$url" \
30+
&& echo 'task done'
31+
RUN ls -l /tmp/powershell.tar.gz
32+
# Unzip the Linux tar.gz
33+
RUN tar zxf /tmp/powershell.tar.gz -C ${PS_INSTALL_FOLDER}
34+
35+
ARG hostRegistry=psdockercache.azurecr.io
36+
FROM --platform=linux/arm64/v8 ${hostRegistry}/ubuntu:jammy AS final-image
37+
38+
# Define Args and Env needed to create links
39+
ARG PS_INSTALL_VERSION=7-preview
40+
ARG PS_VERSION=7.3.0-preview.4
41+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
42+
\
43+
# Define ENVs for Localization/Globalization
44+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
45+
LC_ALL=en_US.UTF-8 \
46+
LANG=en_US.UTF-8 \
47+
# set a fixed location for the Module analysis cache
48+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
49+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-arm64v8-Ubuntu-22.04
50+
# Copy only the files we need from the previous stage
51+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
52+
RUN \
53+
apt-get update \
54+
&& apt-get install --no-install-recommends ca-certificates libssl3 libicu70 less --yes
55+
# Give all user execute permissions and remove write permissions for others
56+
RUN chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
57+
# Create the pwsh symbolic link that points to powershell
58+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \
59+
# Create the pwsh-preview symbolic link that points to powershell
60+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview
61+
# Use PowerShell as the default shell
62+
# Use array to avoid Docker prepending /bin/sh -c
63+
CMD [ "pwsh" ]

Diff for: release/7-3/ubuntu22.04-arm64/meta.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-arm64.tar.gz",
5+
"osVersion": "Ubuntu 22.04 ARM 64v8",
6+
"SkipGssNtlmSspTests": true,
7+
"ShortDistroName": "ubuntu",
8+
"Base64EncodePackageUrl": true,
9+
"UseAcr": false,
10+
"shortTags": [
11+
{"Tag": "jammy-arm64"},
12+
{"Tag": "22.04-arm64"}
13+
],
14+
"TestProperties": {
15+
"size": 550,
16+
"Arm64": true
17+
},
18+
"manifestLists": [
19+
"${channelTag}"
20+
],
21+
"EndOfLife": "2023-04-02",
22+
"DistributionState": "Validated",
23+
"UseInCi": false,
24+
"Architecture": "arm64"
25+
}

0 commit comments

Comments
 (0)