From fc831922a54de28ebff6461a61200cdd24974995 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 25 Apr 2018 16:05:10 -0700 Subject: [PATCH 1/4] Add script to create a container manifest --- docker/createManifest.ps1 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docker/createManifest.ps1 diff --git a/docker/createManifest.ps1 b/docker/createManifest.ps1 new file mode 100644 index 00000000000..0ddf74b6f2a --- /dev/null +++ b/docker/createManifest.ps1 @@ -0,0 +1,38 @@ +# Used to create a container manifest. +# default scenarios is the latest image which will point to ubuntu-16.04 for linux and windowsservercore for windows +param( + [parameter(Mandatory)] + [string] + $ContainerRegistry, + + [ValidateNotNullOrEmpty()] + [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] + [string] + $ManifestTag = 'lastest', + + [ValidateNotNullOrEmpty()] + [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] + [string] + $Image = 'powershell', + + [ValidateNotNullOrEmpty()] + [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] + [string[]] + $TagList = ('ubuntu-16.04', 'windowsservercore') + +) + +$manifestList = @() +foreach($tag in $TagList) +{ + $manifestList += "$ContainerRegistry/${Image}:$tag" +} + +# Create the manifest +docker manifest create $ContainerRegistry/${Image}:$ManifestTag $manifestList + +# Inspect (print) the manifest +docker manifest inspect $ContainerRegistry/${Image}:$ManifestTag + +# push the manifest +docker manifest push $ContainerRegistry/${Image}:$ManifestTag From 9507629a7b49a7645ba459de2ba70f8e7411cca1 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 25 Apr 2018 16:23:12 -0700 Subject: [PATCH 2/4] fix typo --- docker/createManifest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/createManifest.ps1 b/docker/createManifest.ps1 index 0ddf74b6f2a..1796c11a153 100644 --- a/docker/createManifest.ps1 +++ b/docker/createManifest.ps1 @@ -8,7 +8,7 @@ param( [ValidateNotNullOrEmpty()] [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] [string] - $ManifestTag = 'lastest', + $ManifestTag = 'latest', [ValidateNotNullOrEmpty()] [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] From 0420b25012e278f44f20fcb7e60cc104361056e7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 25 Apr 2018 17:27:58 -0700 Subject: [PATCH 3/4] update comments --- docker/createManifest.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/createManifest.ps1 b/docker/createManifest.ps1 index 1796c11a153..967b932d1d9 100644 --- a/docker/createManifest.ps1 +++ b/docker/createManifest.ps1 @@ -1,5 +1,7 @@ # Used to create a container manifest. -# default scenarios is the latest image which will point to ubuntu-16.04 for linux and windowsservercore for windows +# Prereq: you must login to $ContainerRegistery before running this script +# default scenarios is to build a `latest` tag which will point to the `ubuntu-16.04` tag for linux +# and the `windowsservercore` tag for windows param( [parameter(Mandatory)] [string] From 7120e5153a7c821279205c49654d34f9521a381e Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 25 Apr 2018 23:28:53 -0700 Subject: [PATCH 4/4] Remove one extra new line --- docker/createManifest.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/createManifest.ps1 b/docker/createManifest.ps1 index 967b932d1d9..0bb613f3a67 100644 --- a/docker/createManifest.ps1 +++ b/docker/createManifest.ps1 @@ -21,7 +21,6 @@ param( [ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')] [string[]] $TagList = ('ubuntu-16.04', 'windowsservercore') - ) $manifestList = @()