Skip to content

Update and fixes Photon terminal keyboard issue #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions release/community-stable/photon/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
# installed from full PowerShell linux tar.gz package

# Define arg(s) needed for the From statement
ARG fromTag=2.0-20181017
ARG imageRepo=photon

FROM ${imageRepo}:${fromTag} AS installer-env
FROM photon:latest AS installer-env

# Define Args for the needed to add the package
ARG PS_VERSION=6.2.3
ARG PS_VERSION=7.0.1
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-x64.tar.gz
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=7
Expand All @@ -36,13 +33,13 @@ RUN \
&& tar zxf /tmp/powershell-linux.tar.gz -C ${PS_INSTALL_FOLDER}

# Start a new stage so we lose all the tar.gz layers from the final image
FROM ${imageRepo}:${fromTag}
FROM photon:latest

# Copy only the files we need from the previous stage
COPY --from=installer-env ["/opt/microsoft/powershell", "/opt/microsoft/powershell"]

# Define Args and Env needed to create links
ARG PS_VERSION=6.1.0
ARG PS_VERSION=7.0.1
ARG PS_INSTALL_VERSION=7
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
\
Expand All @@ -57,10 +54,7 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
# Invoke-WebRequest : Authentication failed" issue when executing using
# docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [Invoke-WebRequest] [-Uri <HTTPS URL>]
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 \
# Set terminal to linux because there is no xterm library in Photon image
# when docker allocate pseudo-tty
TERM=linux \
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Photon-${fromTag}
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-Photon-latest

# Installation
RUN \
Expand All @@ -76,6 +70,8 @@ RUN \
icu \
# required for help in powershell
less \
# required for xterm library
ncurses-terminfo-6.1-2.ph3.x86_64 \
# generate locale
&& locale-gen.sh \
# create the pwsh symbolic link that points to powershell
Expand Down
14 changes: 0 additions & 14 deletions release/community-stable/photon/getLatestTag.ps1

This file was deleted.

7 changes: 5 additions & 2 deletions release/community-stable/photon/meta.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"IsLinux" : true,
"SkipWebCmdletTests": true,
"SkipWebCmdletTests": false,
"PackageFormat": "powershell-${PS_VERSION}-linux-x64.tar.gz",
"SkipGssNtlmSspTests": true,
"shortTags": [
{"Tag": "latest"}
],
"tagTemplates": [
"#psversion#-photon-#tag#",
"photon-#shorttag#"
"photon"
]
}