Skip to content

Commit c941f18

Browse files
committed
Add arm64 images for ubuntu 22.04
1 parent c656f11 commit c941f18

File tree

8 files changed

+361
-0
lines changed

8 files changed

+361
-0
lines changed

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.18
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.18
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/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.11
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.11
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+
}

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

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

Diff for: release/7-4/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+
}

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

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

Diff for: release/7-5/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)