5
5
# installed from full PowerShell linux tar.gz package
6
6
7
7
# Define arg(s) needed for the From statement
8
- ARG fromTag=2.0-20181017
9
- ARG imageRepo=photon
10
-
11
- FROM ${imageRepo}:${fromTag} AS installer-env
8
+ FROM photon:latest AS installer-env
12
9
13
10
# Define Args for the needed to add the package
14
- ARG PS_VERSION=6.2.3
11
+ ARG PS_VERSION=7.0.1
15
12
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-x64.tar.gz
16
13
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
17
14
ARG PS_INSTALL_VERSION=7
@@ -36,13 +33,13 @@ RUN \
36
33
&& tar zxf /tmp/powershell-linux.tar.gz -C ${PS_INSTALL_FOLDER}
37
34
38
35
# Start a new stage so we lose all the tar.gz layers from the final image
39
- FROM ${imageRepo}:${fromTag}
36
+ FROM photon:latest
40
37
41
38
# Copy only the files we need from the previous stage
42
39
COPY --from=installer-env ["/opt/microsoft/powershell" , "/opt/microsoft/powershell" ]
43
40
44
41
# Define Args and Env needed to create links
45
- ARG PS_VERSION=6.1.0
42
+ ARG PS_VERSION=7.0.1
46
43
ARG PS_INSTALL_VERSION=7
47
44
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
48
45
\
@@ -57,10 +54,7 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
57
54
# Invoke-WebRequest : Authentication failed" issue when executing using
58
55
# docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [Invoke-WebRequest] [-Uri <HTTPS URL>]
59
56
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 \
60
- # Set terminal to linux because there is no xterm library in Photon image
61
- # when docker allocate pseudo-tty
62
- TERM=linux \
63
- POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Photon-${fromTag}
57
+ POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Photon-latest
64
58
65
59
# Installation
66
60
RUN \
76
70
icu \
77
71
# required for help in powershell
78
72
less \
73
+ # required for xterm library
74
+ ncurses-terminfo-6.1-2.ph3.x86_64 \
79
75
# generate locale
80
76
&& locale-gen.sh \
81
77
# create the pwsh symbolic link that points to powershell
0 commit comments