From ca2379d42de0bf3ae5e3d99b2c2675295601aa1c Mon Sep 17 00:00:00 2001 From: Ryen Tang Date: Wed, 20 May 2020 17:21:41 +0800 Subject: [PATCH 1/6] Updated ParrotSec --- .../parrot/docker/Dockerfile | 23 ++++++------------- .../parrot/getLatestTag.ps1 | 4 ++-- .../parrot/meta.json | 4 ++-- 3 files changed, 11 insertions(+), 20 deletions(-) rename release/{unstable => community-stable}/parrot/docker/Dockerfile (85%) rename release/{unstable => community-stable}/parrot/getLatestTag.ps1 (80%) rename release/{unstable => community-stable}/parrot/meta.json (65%) diff --git a/release/unstable/parrot/docker/Dockerfile b/release/community-stable/parrot/docker/Dockerfile similarity index 85% rename from release/unstable/parrot/docker/Dockerfile rename to release/community-stable/parrot/docker/Dockerfile index a3262b4bc..cc99d90bc 100644 --- a/release/unstable/parrot/docker/Dockerfile +++ b/release/community-stable/parrot/docker/Dockerfile @@ -6,7 +6,7 @@ # Define arg(s) needed for the From statement ARG fromTag=latest -ARG imageRepo=parrotsec/parrot-core +ARG imageRepo=parrotsec/core FROM ${imageRepo}:${fromTag} AS installer-env @@ -14,13 +14,10 @@ FROM ${imageRepo}:${fromTag} AS installer-env ENTRYPOINT [ ] # Define Args for the needed to add the package -ARG PS_VERSION=6.2.3 -ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.9_amd64.deb +ARG PS_VERSION=7.0.1 +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=6 - -# Define Args for the needed to add the package -ARG DEBIAN_PACKAGE_URL=http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb +ARG PS_INSTALL_VERSION=7 # Define Args and Env needed to create links ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ @@ -52,18 +49,12 @@ RUN \ locales \ # required to support NTLM for PSRemoting gss-ntlmssp \ - # required for dist-upgrade - resolvconf \ + wget \ + libicu63 \ # enable en_US.UTF-8 locale && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ # generate locale && locale-gen && update-locale \ - # Download the libicu57 Debian package and save it - && wget -O /tmp/libicu57_57.1-6+deb9u3_amd64.deb --no-check-certificate ${DEBIAN_PACKAGE_URL} \ - # install required libicu57 package - && dpkg -i /tmp/libicu57_57.1-6+deb9u3_amd64.deb \ - # remove libicu57 package - && rm -f /tmp/libicu57_57.1-6+deb9u3_amd64.deb \ # upgrade distro && apt-get dist-upgrade -y \ # Download the Debian9 PowerShell Core package and save it @@ -91,7 +82,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Define args needed only for the labels -ARG IMAGE_NAME=pshorg/powershellcommunity:parrot-4.4 +ARG IMAGE_NAME=pshorg/powershellcommunity:parrot-latest ARG VCS_REF="none" # Add label last as it's just metadata and uses a lot of parameters diff --git a/release/unstable/parrot/getLatestTag.ps1 b/release/community-stable/parrot/getLatestTag.ps1 similarity index 80% rename from release/unstable/parrot/getLatestTag.ps1 rename to release/community-stable/parrot/getLatestTag.ps1 index 19d233df0..4a597d6bc 100644 --- a/release/unstable/parrot/getLatestTag.ps1 +++ b/release/community-stable/parrot/getLatestTag.ps1 @@ -4,11 +4,11 @@ # return objects representing the tags we need to base the parrot image on # The versions of parrot we care about -$shortTags = @('4') +$shortTags = @('latest') $parent = Join-Path -Path $PSScriptRoot -ChildPath '..' $repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..' $modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags' Import-Module $modulePath -Get-DockerTags -ShortTags $shortTags -Image "parrotsec/parrot-core" -FullTagFilter '^4\..*$' +Get-DockerTags -ShortTags $shortTags -Image "parrotsec/core" -FullTagFilter '^latest$' diff --git a/release/unstable/parrot/meta.json b/release/community-stable/parrot/meta.json similarity index 65% rename from release/unstable/parrot/meta.json rename to release/community-stable/parrot/meta.json index 47d965127..9ed03e608 100644 --- a/release/unstable/parrot/meta.json +++ b/release/community-stable/parrot/meta.json @@ -1,8 +1,8 @@ { "IsLinux" : true, - "PackageFormat": "powershell_${PS_VERSION}-1.debian.9_amd64.deb", + "PackageFormat": "powershell_${PS_VERSION}-1.debian.11_amd64.deb", "SkipGssNtlmSspTests": false, - "IsBroken": true, + "IsBroken": false, "tagTemplates": [ "#psversion#-parrot-#tag#", "parrot-#shorttag#" From 665ba1cec98ec970dd29333b6bdafb362757cd81 Mon Sep 17 00:00:00 2001 From: Ryen Tang Date: Wed, 20 May 2020 18:50:16 +0800 Subject: [PATCH 2/6] Update minor changes --- docs/README.powershellcommunity.md | 10 +++++----- .../{parrot => parrotsec}/docker/Dockerfile | 2 +- .../{parrot => parrotsec}/getLatestTag.ps1 | 0 .../community-stable/{parrot => parrotsec}/meta.json | 8 +++----- 4 files changed, 9 insertions(+), 11 deletions(-) rename release/community-stable/{parrot => parrotsec}/docker/Dockerfile (98%) rename release/community-stable/{parrot => parrotsec}/getLatestTag.ps1 (100%) rename release/community-stable/{parrot => parrotsec}/meta.json (55%) diff --git a/docs/README.powershellcommunity.md b/docs/README.powershellcommunity.md index 65906623c..c311f4b44 100644 --- a/docs/README.powershellcommunity.md +++ b/docs/README.powershellcommunity.md @@ -38,12 +38,12 @@ $ docker pull pshorg/powershellcommunity * Tags: `oraclelinux-7.5` , `6.1.1-oraclelinux-7.5` * Dockerfile: [/release/community-stable/oraclelinux/docker/Dockerfile][oracle-linux-stable-dockerfile] * Example: `docker pull pshorg/powershellcommunity:oraclelinux-7.5` - + * Example: `docker pull pshorg/powershellcommunity:parrotsec-latest` + * **[Photon Linux][parrotsec-linux-uri]** * Tags: `photon-2.0` , `6.1.1-photon-2.0` * Dockerfile: [/release/community-stable/photon/docker/Dockerfile][photon-linux-stable-dockerfile] @@ -55,7 +55,7 @@ $ docker pull pshorg/powershellcommunity [clear-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/clearlinux/docker/Dockerfile [kali-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/kali-rolling/docker/Dockerfile [oracle-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/oraclelinux/docker/Dockerfile -[parrotsec-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/parrot/docker/Dockerfile +[parrotsec-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/parrotsec/docker/Dockerfile [photon-linux-stable-dockerfile]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/community-stable/photon/docker/Dockerfile [amazon-linux-uri]: https://aws.amazon.com/amazon-linux-2/ diff --git a/release/community-stable/parrot/docker/Dockerfile b/release/community-stable/parrotsec/docker/Dockerfile similarity index 98% rename from release/community-stable/parrot/docker/Dockerfile rename to release/community-stable/parrotsec/docker/Dockerfile index cc99d90bc..df0219dc8 100644 --- a/release/community-stable/parrot/docker/Dockerfile +++ b/release/community-stable/parrotsec/docker/Dockerfile @@ -82,7 +82,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Define args needed only for the labels -ARG IMAGE_NAME=pshorg/powershellcommunity:parrot-latest +ARG IMAGE_NAME=pshorg/powershellcommunity:parrotsec-latest ARG VCS_REF="none" # Add label last as it's just metadata and uses a lot of parameters diff --git a/release/community-stable/parrot/getLatestTag.ps1 b/release/community-stable/parrotsec/getLatestTag.ps1 similarity index 100% rename from release/community-stable/parrot/getLatestTag.ps1 rename to release/community-stable/parrotsec/getLatestTag.ps1 diff --git a/release/community-stable/parrot/meta.json b/release/community-stable/parrotsec/meta.json similarity index 55% rename from release/community-stable/parrot/meta.json rename to release/community-stable/parrotsec/meta.json index 9ed03e608..2009f197e 100644 --- a/release/community-stable/parrot/meta.json +++ b/release/community-stable/parrotsec/meta.json @@ -2,10 +2,8 @@ "IsLinux" : true, "PackageFormat": "powershell_${PS_VERSION}-1.debian.11_amd64.deb", "SkipGssNtlmSspTests": false, - "IsBroken": false, "tagTemplates": [ - "#psversion#-parrot-#tag#", - "parrot-#shorttag#" - ], - "continueOnError": true + "#psversion#-parrotsec-#tag#", + "parrotsec-#shorttag#" + ] } From 5604e78ae5e99ba25e7cbe65dc6676f4c0bd224f Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 20 May 2020 11:41:05 -0700 Subject: [PATCH 3/6] Update meta.json --- release/preview/debian11/meta.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/preview/debian11/meta.json b/release/preview/debian11/meta.json index 76d23415b..dc09fa68f 100644 --- a/release/preview/debian11/meta.json +++ b/release/preview/debian11/meta.json @@ -10,7 +10,7 @@ ], "SubImage": "test-deps", "TestProperties": { - "size": 314 + "size": 330 } } From 4c2c27690fdc88fe8967722988140576bcc85380 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 20 May 2020 11:42:45 -0700 Subject: [PATCH 4/6] Delete getLatestTag.ps1 --- .../community-stable/parrotsec/getLatestTag.ps1 | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 release/community-stable/parrotsec/getLatestTag.ps1 diff --git a/release/community-stable/parrotsec/getLatestTag.ps1 b/release/community-stable/parrotsec/getLatestTag.ps1 deleted file mode 100644 index 4a597d6bc..000000000 --- a/release/community-stable/parrotsec/getLatestTag.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -# return objects representing the tags we need to base the parrot image on - -# The versions of parrot we care about -$shortTags = @('latest') - -$parent = Join-Path -Path $PSScriptRoot -ChildPath '..' -$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..' -$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags' -Import-Module $modulePath - -Get-DockerTags -ShortTags $shortTags -Image "parrotsec/core" -FullTagFilter '^latest$' From 2af8d9e64d3eaa125f5007518e398aece46dfddb Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 20 May 2020 11:44:15 -0700 Subject: [PATCH 5/6] Update meta.json --- release/community-stable/parrotsec/meta.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/release/community-stable/parrotsec/meta.json b/release/community-stable/parrotsec/meta.json index 2009f197e..e69f0f3c6 100644 --- a/release/community-stable/parrotsec/meta.json +++ b/release/community-stable/parrotsec/meta.json @@ -2,8 +2,11 @@ "IsLinux" : true, "PackageFormat": "powershell_${PS_VERSION}-1.debian.11_amd64.deb", "SkipGssNtlmSspTests": false, + "shortTags": [ + {"Tag": "latest"} + ], "tagTemplates": [ "#psversion#-parrotsec-#tag#", - "parrotsec-#shorttag#" + "parrotsec" ] } From 4e89d5dc3b1f4dec20a0f1c562a6d59ce12f67cc Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 20 May 2020 11:45:27 -0700 Subject: [PATCH 6/6] Update Dockerfile --- release/community-stable/parrotsec/docker/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/release/community-stable/parrotsec/docker/Dockerfile b/release/community-stable/parrotsec/docker/Dockerfile index df0219dc8..40b75c73e 100644 --- a/release/community-stable/parrotsec/docker/Dockerfile +++ b/release/community-stable/parrotsec/docker/Dockerfile @@ -4,11 +4,7 @@ # Docker image file that describes an Parrot image with PowerShell # installed from Debian9 PowerShell package -# Define arg(s) needed for the From statement -ARG fromTag=latest -ARG imageRepo=parrotsec/core - -FROM ${imageRepo}:${fromTag} AS installer-env +FROM parrotsec/core:latest AS installer-env # Clear the entrypoint in parrotsec/parrot-core image ENTRYPOINT [ ]