File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Used to create a container manifest.
2+ # Prereq: you must login to $ContainerRegistery before running this script
3+ # default scenarios is to build a `latest` tag which will point to the `ubuntu-16.04` tag for linux
4+ # and the `windowsservercore` tag for windows
5+ param (
6+ [parameter (Mandatory )]
7+ [string ]
8+ $ContainerRegistry ,
9+
10+ [ValidateNotNullOrEmpty ()]
11+ [ValidatePattern (' ^[abcdefghijklmnopqrstuvwxyz-]+$' )]
12+ [string ]
13+ $ManifestTag = ' latest' ,
14+
15+ [ValidateNotNullOrEmpty ()]
16+ [ValidatePattern (' ^[abcdefghijklmnopqrstuvwxyz-]+$' )]
17+ [string ]
18+ $Image = ' powershell' ,
19+
20+ [ValidateNotNullOrEmpty ()]
21+ [ValidatePattern (' ^[abcdefghijklmnopqrstuvwxyz-]+$' )]
22+ [string []]
23+ $TagList = (' ubuntu-16.04' , ' windowsservercore' )
24+ )
25+
26+ $manifestList = @ ()
27+ foreach ($tag in $TagList )
28+ {
29+ $manifestList += " $ContainerRegistry /${Image} :$tag "
30+ }
31+
32+ # Create the manifest
33+ docker manifest create $ContainerRegistry / ${Image} :$ManifestTag $manifestList
34+
35+ # Inspect (print) the manifest
36+ docker manifest inspect $ContainerRegistry / ${Image} :$ManifestTag
37+
38+ # push the manifest
39+ docker manifest push $ContainerRegistry / ${Image} :$ManifestTag
You can’t perform that action at this time.
0 commit comments