Skip to content

Commit c656f11

Browse files
committed
Add arm64 images for ubuntu 20.04
1 parent 7ed1970 commit c656f11

File tree

8 files changed

+352
-0
lines changed

8 files changed

+352
-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.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+
# 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.18
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-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.11
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.11
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-4/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.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+
# 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.4.1
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-4/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-5/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.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+
# 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.4.1
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-5/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+
}

0 commit comments

Comments
 (0)