Skip to content

Commit 4dbec0b

Browse files
Update setting the environment variable
1 parent 0369e5e commit 4dbec0b

File tree

9 files changed

+25
-6
lines changed

9 files changed

+25
-6
lines changed

release/preview/alpine39/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v
3030
# Start a new stage so we lose all the tar.gz layers from the final image
3131
FROM ${imageRepo}:${fromTag}
3232

33+
ARG fromTag=3.9
34+
3335
# Copy only the files we need from the previous stage
3436
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
3537

@@ -43,7 +45,7 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
4345
LANG=en_US.UTF-8 \
4446
# set a fixed location for the Module analysis cache
4547
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
46-
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Alpine-3.9
48+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Alpine-${fromTag}
4749

4850
# Install dotnet dependencies and ca-certificates
4951
RUN apk add --no-cache \

release/preview/alpine39/test-deps/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ FROM node:10.15.3-alpine as node
88

99
FROM ${BaseImage}
1010

11+
ARG fromTag=3.9
12+
1113
ENV NODE_VERSION 10.15.3 \
1214
YARN_VERSION=1.13.0 \
1315
NVM_DIR="/root/.nvm" \
14-
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Alpine-3.9
16+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Alpine-${fromTag}
1517

1618
# workaround for Alpine to run in Azure DevOps
1719
ENV NODE_NO_WARNINGS=1

release/preview/centos7/docker/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ ARG PACKAGE_VERSION=6.2.0_preview.2
99
ARG PS_PACKAGE=powershell-preview-${PACKAGE_VERSION}-1.rhel.7.x86_64.rpm
1010
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
1111

12+
ARG fromTag=7
13+
ARG imageRepo=centos
14+
1215
# Define ENVs for Localization/Globalization
1316
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
1417
LC_ALL=en_US.UTF-8 \
1518
LANG=en_US.UTF-8 \
1619
# set a fixed location for the Module analysis cache
1720
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
18-
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-CentOS-7
21+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-CentOS-${fromTag}
1922

2023
# Install dependencies and clean up
2124
RUN curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell.rpm \

release/preview/fedora/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ARG PACKAGE_VERSION=6.2.0_preview.2
99
ARG PS_PACKAGE=powershell-preview-${PACKAGE_VERSION}-1.rhel.7.x86_64.rpm
1010
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
1111

12+
ARG fromTag=28
13+
1214
# Define ENVs for Localization/Globalization
1315
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
1416
LC_ALL=en_US.UTF-8 \

release/preview/fedora/test-deps/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ARG BaseImage=mcr.microsoft.com/powershell:fedora-28
33

44
FROM ${BaseImage}
55

6+
ARG fromTag=28
7+
68
# Install dependencies and clean up
79
RUN dnf install -y \
810
sudo \
@@ -13,7 +15,7 @@ RUN dnf install -y \
1315
procps-ng \
1416
&& dnf clean all
1517

16-
ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Fedora-28
18+
ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-Fedora-${fromTag}
1719

1820
# Define args needed only for the labels
1921
ARG VCS_REF="none"

release/preview/nanoserver/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ RUN Write-host "Verifying valid Version..."; `
3939
# Install PowerShell into NanoServer
4040
FROM ${NanoServerRepo}:${fromTag}
4141

42+
ARG fromTag=1709
43+
4244
ARG VCS_REF="none"
4345
ARG PS_VERSION=6.1.0-rc.1
4446
ARG IMAGE_NAME=mcr.microsoft.com/powershell

release/preview/nanoserver1809/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ RUN Write-host "Verifying valid Version..."; `
3939
# Install PowerShell into NanoServer
4040
FROM ${NanoServerRepo}:${fromTag}
4141

42+
ARG fromTag=1709
43+
4244
ARG VCS_REF="none"
4345
ARG PS_VERSION=6.2.0-rc.1
4446
ARG IMAGE_NAME=mcr.microsoft.com/powershell

release/preview/opensuse423/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v
3737
# Start a new stage so we lose all the tar.gz layers from the final image
3838
FROM ${imageRepo}:${fromTag}
3939

40+
ARG fromTag=42.3
41+
4042
# Copy only the files we need from the previous stage
4143
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]
4244

@@ -50,7 +52,7 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
5052
LANG=en_US.UTF-8 \
5153
# set a fixed location for the Module analysis cache
5254
PSModuleAnalysisCachePath=/var/cache/microsoft/powershell/PSModuleAnalysisCache/ModuleAnalysisCache \
53-
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-OpenSUSE-42.3
55+
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-OpenSUSE-${fromTag}
5456

5557
# Install dependencies
5658
RUN zypper --non-interactive update --skip-interactive \

release/preview/opensuse423/test-deps/docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ARG BaseImage=mcr.microsoft.com/powershell:opensuse-42.3
33

44
FROM ${BaseImage}
55

6+
ARG fromTag=42.3
7+
68
# Install dependencies and clean up
79
RUN zypper --non-interactive update --skip-interactive \
810
&& zypper --non-interactive install \
@@ -16,7 +18,7 @@ RUN zypper --non-interactive update --skip-interactive \
1618
# remove package manager log file
1719
&& rm -f /var/log/zypp/history /var/log/zypper.log
1820

19-
ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-OpenSUSE-42.3
21+
ENV POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-TestDeps-OpenSUSE-${fromTag}
2022

2123
# Define args needed only for the labels
2224
ARG VCS_REF="none"

0 commit comments

Comments
 (0)