Skip to content

Commit

Permalink
Add OpenSSH client package to linux community-stable images (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiazhi authored Jul 26, 2020
1 parent d78d60f commit 7ceb5f5
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 19 deletions.
8 changes: 5 additions & 3 deletions release/community-stable/amazonlinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ ENV \

# Installation
RUN \
# download PowerShell rpm package
curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.rpm \
# update package list
&& yum update -y \
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 All @@ -42,6 +42,8 @@ RUN \
&& yum install -y \
# install gssntlmssp package
gssntlmssp \
# download the powershell package
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.rpm \
# install powershell package
&& yum install -y /tmp/powershell-linux.rpm \
# remove powershell package
Expand Down
8 changes: 5 additions & 3 deletions release/community-stable/archlinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN \
FROM archlinux:latest

# Copy only the files we need from the previous stage
COPY --from=installer-env ["/tmp/gss-ntlmssp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz", "/tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz"]
COPY --from=installer-env ["/tmp/gss-ntlmssp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst", "/tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst"]

# Define Args for the needed to add the package
ARG PS_VERSION=7.0.1
Expand Down Expand Up @@ -80,11 +80,13 @@ 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 \
&& pacman -U --noconfirm /tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst \
# create powershell folder
&& mkdir -p ${PS_INSTALL_FOLDER} \
# Pull down the powershell linux tar file
# download the powershell linux compressed package
&& 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 \
Expand Down
8 changes: 5 additions & 3 deletions release/community-stable/blackarch/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN \
FROM archlinux:latest

# Copy only the files we need from the previous stage
COPY --from=installer-env ["/tmp/gss-ntlmssp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz", "/tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.xz"]
COPY --from=installer-env ["/tmp/gss-ntlmssp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst", "/tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst"]

# Define Args for the needed for BlackArch Linux
ARG BlackArch_Strap_URL=https://blackarch.org/strap.sh
Expand Down Expand Up @@ -95,11 +95,13 @@ 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 \
&& pacman -U --noconfirm /tmp/gss-ntlmssp-0.8.0.r3.g2251a72-1-x86_64.pkg.tar.zst \
# create powershell folder
&& mkdir -p ${PS_INSTALL_FOLDER} \
# Pull down the powershell linux tar file
# download the powershell linux compressed package
&& 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} \
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
8 changes: 5 additions & 3 deletions release/community-stable/kalilinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN \
# install dependencies
&& apt-get install --no-install-recommends -y \
# required for HttpClientHandler
libcurl4 \
curl \
# required for SSL
ca-certificates \
# required for help in powershell
Expand All @@ -44,14 +44,16 @@ 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} \
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell.deb \
# install powershell package
&& apt-get install --no-install-recommends -y /tmp/powershell.deb \
# remove powershell package
Expand Down
10 changes: 6 additions & 4 deletions release/community-stable/parrotsec/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,25 @@ RUN \
# install dependencies
&& apt install --no-install-recommends -y \
# required for HttpClientHandler
libcurl4 \
curl \
# required for help in powershell
less \
# required to setup the locale
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} \
# download the powershell package
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell.deb \
# install powershell package
&& apt install --no-install-recommends -y /tmp/powershell.deb \
# remove powershell package
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
8 changes: 5 additions & 3 deletions release/unstable/oraclelinux/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,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 -y \
# 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 All @@ -42,6 +42,8 @@ RUN \
&& yum install -y \
# install gssntlmssp package
gssntlmssp \
# download the powershell package
&& curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell-linux.rpm \
# install powershell package
&& yum install -y /tmp/powershell-linux.rpm \
# remove powershell package
Expand Down

0 comments on commit 7ceb5f5

Please sign in to comment.