22# Licensed under the MIT License.
33#
44# Docker image file that describes an Kali Rolling image with PowerShell
5- # installed from Debian9 PowerShell package
5+ # installed from Debian11 PowerShell package
66
7- # Define arg(s) needed for the From statement
8- ARG fromTag=kali-rolling
9- ARG imageRepo=kalilinux/kali-linux-docker
10-
11- FROM ${imageRepo}:${fromTag} AS installer-env
7+ FROM kalilinux/kali-rolling:latest AS installer-env
128
139# Define Args for the needed to add the package
14- ARG PS_VERSION=6.2.3
15- ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.9_amd64 .deb
10+ ARG PS_VERSION=7.0.1
11+ ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.11_amd64 .deb
1612ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
1713ARG PS_INSTALL_VERSION=7
1814
19- # Define Args for the needed to add the package
20- ARG KALI_REPO_KEY_PACKAGE_URL=https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.2_all.deb
21-
22- # Define Args for the needed to add the package
23- ARG DEBIAN_PACKAGE_URL=http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb
24-
2515# Define Args and Env needed to create links
2616ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
2717 \
@@ -40,20 +30,8 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \
4030
4131# Installation
4232RUN \
43- # Download the Kali repository package and save it
44- wget -O /tmp/kali-archive-keyring_2018.2_all.deb --no-check-certificate ${KALI_REPO_KEY_PACKAGE_URL} \
45- # install kali package to renew kali repository expired certificate in container image
46- && apt-get install --no-install-recommends /tmp/kali-archive-keyring_2018.2_all.deb \
47- # remove kali package
48- && rm -f /tmp/kali-archive-keyring_2018.2_all.deb \
49- # Download the libicu57 Debian package and save it
50- && wget -O /tmp/libicu57_57.1-6+deb9u3_amd64.deb --no-check-certificate ${DEBIAN_PACKAGE_URL} \
51- # install required libicu57 package
52- && dpkg -i /tmp/libicu57_57.1-6+deb9u3_amd64.deb \
53- # remove libicu57 package
54- && rm -f /tmp/libicu57_57.1-6+deb9u3_amd64.deb \
5533 # update package list
56- && apt-get update \
34+ apt-get update \
5735 # install dependencies
5836 && apt-get install --no-install-recommends -y \
5937 # required for HttpClientHandler
6644 locales \
6745 # required to support NTLM for PSRemoting
6846 gss-ntlmssp \
47+ wget \
48+ libicu63 \
6949 # enable en_US.UTF-8 locale
7050 && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
7151 # generate locale
9575 && rm -rf /var/lib/apt/lists/*
9676
9777# Define args needed only for the labels
98- ARG IMAGE_NAME=pshorg/powershellcommunity:kali-kali-rolling
78+ ARG IMAGE_NAME=pshorg/powershellcommunity:kalilinux
9979ARG VCS_REF="none"
10080
10181# Add label last as it's just metadata and uses a lot of parameters
0 commit comments