mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
fix create docker manifest script to work with more complex tags and with repeated use (#6852)
fix create docker manifest script to work with more complex tags and with repeated use - add characters to validation pattern - purge manifest after pushing as there is no other way to delete the manifest.
This commit is contained in:
@@ -8,17 +8,17 @@ param(
|
||||
$ContainerRegistry,
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
|
||||
[string]
|
||||
$ManifestTag = 'latest',
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
|
||||
[string]
|
||||
$Image = 'powershell',
|
||||
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz-]+$')]
|
||||
[ValidatePattern('^[abcdefghijklmnopqrstuvwxyz\-0123456789\.]+$')]
|
||||
[string[]]
|
||||
$TagList = ('ubuntu-16.04', 'windowsservercore')
|
||||
)
|
||||
@@ -36,4 +36,4 @@ docker manifest create $ContainerRegistry/${Image}:$ManifestTag $manifestList
|
||||
docker manifest inspect $ContainerRegistry/${Image}:$ManifestTag
|
||||
|
||||
# push the manifest
|
||||
docker manifest push $ContainerRegistry/${Image}:$ManifestTag
|
||||
docker manifest push --purge $ContainerRegistry/${Image}:$ManifestTag
|
||||
|
||||
Reference in New Issue
Block a user