Skip to content
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

Add SSH client package to community-stable images #462

Closed
wants to merge 10 commits into from
7 changes: 5 additions & 2 deletions release/community-stable/amazonlinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ARG PS_PACKAGE=powershell-${PS_VERSION}-1.rhel.7.x86_64.rpm
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=7

# Download the PowerShell Core Linux .rpm and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell-linux.rpm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you revert this? It improved the image size.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I forgotten about the layer size issue since I was helping on some work requirement for standardising syntax. lol.


# Define Args and Env needed to create links
ENV \
PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
Expand All @@ -26,14 +29,14 @@ ENV \

# Installation
RUN \
# download PowerShell rpm package
curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.rpm \
# update package list
&& yum update -y \
# install dependencies
&& yum install -y \
# required for help in PowerShell
less \
# required for SSH
openssh-clients \
# install EPEL repository
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
# update package list from EPEL repository
Expand Down
7 changes: 5 additions & 2 deletions release/community-stable/archlinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ 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

# Download the PowerShell Core Linux tar.gz and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell-linux.tar.gz

# Define Args and Env needed to create links
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
\
Expand Down Expand Up @@ -80,12 +83,12 @@ RUN \
core/icu \
# required for SSL
openssl-1.0 \
# required for SSH
openssh \
# install gss-ntlmssp package from the previous stage
&& pacman -U --noconfirm /tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz \
# create powershell folder
&& mkdir -p ${PS_INSTALL_FOLDER} \
# Pull down the powershell linux tar file
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.tar.gz \
# uncompress powershell linux tar file
&& tar zxf /tmp/powershell-linux.tar.gz -C ${PS_INSTALL_FOLDER} -v \
# remove powershell linux tar file
Expand Down
7 changes: 5 additions & 2 deletions release/community-stable/blackarch/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ 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

# Download the PowerShell Core Linux tar.gz and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell-linux.tar.gz

# Define Args and Env needed to create links
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
\
Expand Down Expand Up @@ -95,12 +98,12 @@ RUN \
core/icu \
# required for SSL
openssl-1.0 \
# required for SSH
openssh \
# install gss-ntlmssp package from the previous stage
&& pacman -U --noconfirm /tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz \
# create powershell folder
&& mkdir -p ${PS_INSTALL_FOLDER} \
# Pull down the powershell linux tar file
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.tar.gz \
# uncompress powershell linux tar file
&& tar zxf /tmp/powershell-linux.tar.gz -C ${PS_INSTALL_FOLDER} \
# remove powershell linux tar file
Expand Down
3 changes: 3 additions & 0 deletions release/community-stable/clearlinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
RUN \
# install dependencies
swupd bundle-add \
# required for help in PowerShell
less \
# required for SSH
openssh-client \
# create powershell folder
&& mkdir -p ${PS_INSTALL_FOLDER} \
# uncompress powershell linux tar file
Expand Down
9 changes: 6 additions & 3 deletions release/community-stable/kalilinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.11_amd64.deb
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=7

# Download the PowerShell Core Linux .deb and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell.deb

# Define Args and Env needed to create links
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
\
Expand Down Expand Up @@ -44,14 +47,14 @@ RUN \
locales \
# required to support NTLM for PSRemoting
gss-ntlmssp \
wget \
# required for International Components for Unicode
libicu63 \
# required for SSH
openssh-client \
# enable en_US.UTF-8 locale
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
# generate locale
&& locale-gen && update-locale \
# download the powershell package
&& wget -O /tmp/powershell.deb --no-check-certificate ${PS_PACKAGE_URL} \
# install powershell package
&& apt-get install --no-install-recommends -y /tmp/powershell.deb \
# remove powershell package
Expand Down
9 changes: 6 additions & 3 deletions release/community-stable/oraclelinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ ARG PS_PACKAGE=powershell-${PS_VERSION}-1.rhel.7.x86_64.rpm
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=7

# Download the PowerShell Core Linux .rpm and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell-linux.rpm

# Define Args and Env needed to create links
ENV \
PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
Expand All @@ -26,14 +29,14 @@ ENV \

# Installation
RUN \
# download PowerShell rpm package
curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.rpm \
# update package list
&& yum update \
yum update \
# install dependencies
&& yum install -y \
# required for help in powershell
less \
# required for SSH
openssh-clients \
# install EPEL repository
oracle-epel-release-el7 \
# update package list from EPEL repository
Expand Down
13 changes: 8 additions & 5 deletions release/community-stable/parrotsec/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.11_amd64.deb
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=7

# Download the PowerShell Core Linux .deb and save it
ADD ${PS_PACKAGE_URL} /tmp/powershell.deb

# Define Args and Env needed to create links
ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
\
Expand Down Expand Up @@ -45,16 +48,14 @@ RUN \
locales \
# required to support NTLM for PSRemoting
gss-ntlmssp \
wget \
# required for International Components for Unicode
libicu63 \
# required for SSH
openssh-client \
# enable en_US.UTF-8 locale
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
# generate locale
&& locale-gen && update-locale \
# upgrade distro
&& parrot-upgrade \
# Download the Debian9 PowerShell Core package and save it
&& wget -O /tmp/powershell.deb --no-check-certificate ${PS_PACKAGE_URL} \
# install powershell package
&& apt install --no-install-recommends -y /tmp/powershell.deb \
# remove powershell package
Expand All @@ -72,6 +73,8 @@ RUN \
Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \
Start-Sleep -Seconds 6 ; \
}" \
# upgrade distro
&& parrot-upgrade \
# clean downloaded packages
&& apt autoremove \
# remove package list
Expand Down
2 changes: 2 additions & 0 deletions release/community-stable/photon/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ RUN \
less \
# required for xterm library
ncurses-terminfo-6.1-2.ph3.x86_64 \
# required for SSH
openssh-clients \
# generate locale
&& locale-gen.sh \
# create the pwsh symbolic link that points to powershell
Expand Down