Skip to content

Commit c829178

Browse files
committed
merge two commits with 7-4 and 7-3 copy
2 parents 36696b3 + 6fb5d18 commit c829178

File tree

48 files changed

+1897
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1897
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
# Docker image file that describes an Alpine3.14 image with PowerShell installed from .tar.gz file(s)
5+
6+
FROM alpine:3.14 AS installer-env
7+
8+
# Define Args for the needed to add the package
9+
ARG PS_VERSION=7.3.0-preview.8
10+
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-alpine-x64.tar.gz
11+
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
12+
ARG PS_INSTALL_VERSION=7-preview
13+
14+
# Download the Linux tar.gz and save it
15+
ADD ${PS_PACKAGE_URL} /tmp/linux.tar.gz
16+
17+
# define the folder we will be installing PowerShell to
18+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
19+
20+
# Create the install folder
21+
RUN mkdir -p ${PS_INSTALL_FOLDER}
22+
23+
# Unzip the Linux tar.gz
24+
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v
25+
26+
# Start a new stage so we lose all the tar.gz layers from the final image
27+
FROM alpine:3.14
28+
29+
# Copy only the files we need from the previous stage
30+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
31+
32+
# Define Args and Env needed to create links
33+
ARG PS_INSTALL_VERSION=7-preview
34+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
35+
\
36+
# Define ENVs for Localization/Globalization
37+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
38+
LC_ALL=en_US.UTF-8 \
39+
LANG=en_US.UTF-8 \
40+
# set a fixed location for the Module analysis cache
41+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
42+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Alpine-3.14
43+
44+
# Install dotnet dependencies and ca-certificates
45+
RUN apk add --no-cache \
46+
ca-certificates \
47+
less \
48+
\
49+
# PSReadline/console dependencies
50+
ncurses-terminfo-base \
51+
\
52+
# .NET Core dependencies
53+
krb5-libs \
54+
libgcc \
55+
libintl \
56+
libssl1.1 \
57+
libstdc++ \
58+
tzdata \
59+
userspace-rcu \
60+
zlib \
61+
icu-libs \
62+
&& apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
63+
lttng-ust \
64+
\
65+
# PowerShell remoting over SSH dependencies
66+
openssh-client \
67+
\
68+
&& apk update \
69+
&& apk upgrade \
70+
# Create the pwsh symbolic link that points to powershell
71+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \
72+
\
73+
# Create the pwsh-preview symbolic link that points to powershell
74+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview \
75+
# Give all user execute permissions and remove write permissions for others
76+
&& chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
77+
# intialize powershell module cache
78+
# and disable telemetry
79+
&& export POWERSHELL_TELEMETRY_OPTOUT=1 \
80+
&& pwsh \
81+
-NoLogo \
82+
-NoProfile \
83+
-Command " \
84+
\$ErrorActionPreference = 'Stop' ; \
85+
\$ProgressPreference = 'SilentlyContinue' ; \
86+
while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { \
87+
Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \
88+
Start-Sleep -Seconds 6 ; \
89+
}"
90+
91+
CMD [ "pwsh" ]

release/7-4/alpine314/meta.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-alpine-x64.tar.gz",
5+
"osVersion": "Alpine 3.14",
6+
"shortDistroName": "alpine",
7+
"shortTags": [
8+
{"Tag": "3.14"}
9+
],
10+
"SkipGssNtlmSspTests": true,
11+
"SubImage": "test-deps",
12+
"TestProperties": {
13+
"size": 251
14+
},
15+
"EndOfLife": "2023-05-01",
16+
"DistributionState": "Validated",
17+
"UseInCi": false
18+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Docker image file that describes an Alpine image with PowerShell and test dependencies
2+
3+
ARG BaseImage=mcr.microsoft.com/powershell:alpine-3.14
4+
5+
FROM ${BaseImage}
6+
7+
ENV NODE_VERSION=14.17.6 \
8+
YARN_VERSION=1.22.5 \
9+
NVM_DIR="/root/.nvm" \
10+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Alpine-3.14
11+
12+
# workaround for Alpine to run in Azure DevOps
13+
ENV NODE_NO_WARNINGS=1
14+
15+
RUN apk add --no-cache --virtual .pipeline-deps readline linux-pam \
16+
&& apk add --no-cache \
17+
bash \
18+
sudo \
19+
shadow \
20+
openssl \
21+
curl \
22+
git \
23+
unzip \
24+
nodejs \
25+
&& apk update \
26+
&& apk upgrade \
27+
&& apk del .pipeline-deps \
28+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
29+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg
30+
31+
LABEL com.azure.dev.pipelines.agent.handler.node.path="/usr/local/bin/node"
32+
33+
# Use PowerShell as the default shell
34+
# Use array to avoid Docker prepending /bin/sh -c
35+
CMD [ "pwsh" ]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"SkipGssNtlmSspTests": true,
5+
"osVersion": "Alpine 3.14",
6+
"tagTemplates": [
7+
"alpine-#shorttag#"
8+
],
9+
"OptionalTests": [
10+
"test-deps",
11+
"test-deps-musl"
12+
],
13+
"TestProperties": {
14+
"size": 335
15+
}
16+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
# Docker image file that describes an Alpine3.14 image with PowerShell installed from .tar.gz file(s)
5+
6+
FROM alpine:3.15 AS installer-env
7+
8+
# Define Args for the needed to add the package
9+
ARG PS_VERSION=7.3.0-preview.8
10+
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-alpine-x64.tar.gz
11+
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
12+
ARG PS_INSTALL_VERSION=7-preview
13+
14+
# Download the Linux tar.gz and save it
15+
ADD ${PS_PACKAGE_URL} /tmp/linux.tar.gz
16+
17+
# define the folder we will be installing PowerShell to
18+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
19+
20+
# Create the install folder
21+
RUN mkdir -p ${PS_INSTALL_FOLDER}
22+
23+
# Unzip the Linux tar.gz
24+
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v
25+
26+
# Start a new stage so we lose all the tar.gz layers from the final image
27+
FROM alpine:3.15
28+
29+
# Copy only the files we need from the previous stage
30+
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
31+
32+
# Define Args and Env needed to create links
33+
ARG PS_INSTALL_VERSION=7-preview
34+
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
35+
\
36+
# Define ENVs for Localization/Globalization
37+
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
38+
LC_ALL=en_US.UTF-8 \
39+
LANG=en_US.UTF-8 \
40+
# set a fixed location for the Module analysis cache
41+
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
42+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Alpine-3.15
43+
44+
# Install dotnet dependencies and ca-certificates
45+
RUN apk add --no-cache \
46+
ca-certificates \
47+
less \
48+
\
49+
# PSReadline/console dependencies
50+
ncurses-terminfo-base \
51+
\
52+
# .NET Core dependencies
53+
krb5-libs \
54+
libgcc \
55+
libintl \
56+
libssl1.1 \
57+
libstdc++ \
58+
tzdata \
59+
userspace-rcu \
60+
zlib \
61+
icu-libs \
62+
&& apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache \
63+
lttng-ust \
64+
\
65+
# PowerShell remoting over SSH dependencies
66+
openssh-client \
67+
\
68+
&& apk update \
69+
&& apk upgrade \
70+
# Create the pwsh symbolic link that points to powershell
71+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh \
72+
\
73+
# Create the pwsh-preview symbolic link that points to powershell
74+
&& ln -s ${PS_INSTALL_FOLDER}/pwsh /usr/bin/pwsh-preview \
75+
# Give all user execute permissions and remove write permissions for others
76+
&& chmod a+x,o-w ${PS_INSTALL_FOLDER}/pwsh \
77+
# intialize powershell module cache
78+
# and disable telemetry
79+
&& export POWERSHELL_TELEMETRY_OPTOUT=1 \
80+
&& pwsh \
81+
-NoLogo \
82+
-NoProfile \
83+
-Command " \
84+
\$ErrorActionPreference = 'Stop' ; \
85+
\$ProgressPreference = 'SilentlyContinue' ; \
86+
while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { \
87+
Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \
88+
Start-Sleep -Seconds 6 ; \
89+
}"
90+
91+
CMD [ "pwsh" ]

release/7-4/alpine315/meta.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"PackageFormat": "powershell-${PS_VERSION}-linux-alpine-x64.tar.gz",
5+
"osVersion": "Alpine 3.15",
6+
"shortDistroName": "alpine",
7+
"shortTags": [
8+
{"Tag": "3.15"}
9+
],
10+
"SkipGssNtlmSspTests": true,
11+
"SubImage": "test-deps",
12+
"TestProperties": {
13+
"size": 252
14+
},
15+
"EndOfLife": "2023-11-01",
16+
"DistributionState": "Validating",
17+
"UseInCi": false
18+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Docker image file that describes an Alpine image with PowerShell and test dependencies
2+
3+
ARG BaseImage=mcr.microsoft.com/powershell:alpine-3.15
4+
5+
FROM ${BaseImage}
6+
7+
ENV NODE_VERSION=14.17.6 \
8+
YARN_VERSION=1.22.5 \
9+
NVM_DIR="/root/.nvm" \
10+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Alpine-3.15
11+
12+
# workaround for Alpine to run in Azure DevOps
13+
ENV NODE_NO_WARNINGS=1
14+
15+
RUN apk add --no-cache --virtual .pipeline-deps readline linux-pam \
16+
&& apk add --no-cache \
17+
bash \
18+
sudo \
19+
shadow \
20+
openssl \
21+
curl \
22+
git \
23+
unzip \
24+
nodejs \
25+
&& apk update \
26+
&& apk upgrade \
27+
&& apk del .pipeline-deps \
28+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
29+
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg
30+
31+
LABEL com.azure.dev.pipelines.agent.handler.node.path="/usr/local/bin/node"
32+
33+
# Use PowerShell as the default shell
34+
# Use array to avoid Docker prepending /bin/sh -c
35+
CMD [ "pwsh" ]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"IsLinux" : true,
3+
"UseLinuxVersion": false,
4+
"SkipGssNtlmSspTests": true,
5+
"osVersion": "Alpine 3.14",
6+
"tagTemplates": [
7+
"alpine-#shorttag#"
8+
],
9+
"OptionalTests": [
10+
"test-deps",
11+
"test-deps-musl"
12+
],
13+
"TestProperties": {
14+
"size": 335
15+
}
16+
}

0 commit comments

Comments
 (0)