-
-
Save mikhailshilkov/978ae50e26c6e712c56fbd4d73b48222 to your computer and use it in GitHub Desktop.
Docker "no digest available" repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Pulumi; | |
using Pulumi.AzureNextGen.ContainerRegistry.Latest; | |
using SkuArgs = Pulumi.AzureNextGen.ContainerRegistry.Latest.Inputs.SkuArgs; | |
using Pulumi.AzureNextGen.Resources.Latest; | |
using Pulumi.AzureNextGen.Resources.Latest.Inputs; | |
using Pulumi.Docker; | |
class MyStack : Stack | |
{ | |
public MyStack() | |
{ | |
// Create an Azure Resource Group | |
var resourceGroup = new ResourceGroup("resourceGroup", new ResourceGroupArgs | |
{ | |
ResourceGroupName = "mikhail-rg", | |
Location = "WestUS", | |
Tags = | |
{ | |
{ "Owner", "mikhail" } | |
} | |
}); | |
var registry = new Registry("myregistry", new RegistryArgs | |
{ | |
ResourceGroupName = resourceGroup.Name, | |
RegistryName = $"registryboosa", | |
Location = resourceGroup.Location, | |
Sku = new SkuArgs { Name = "Basic" }, | |
AdminUserEnabled = true | |
}); | |
var credentials = Output.Tuple(resourceGroup.Name, registry.Name).Apply(values => | |
ListRegistryCredentials.InvokeAsync(new ListRegistryCredentialsArgs | |
{ | |
ResourceGroupName = values.Item1, | |
RegistryName = values.Item2 | |
})); | |
var adminUsername = credentials.Apply(c => c.Username ?? ""); | |
var adminPassword = credentials.Apply(c => Output.CreateSecret(c.Passwords.First().Value ?? "")); | |
for (int a = 0; a < 30; a++) | |
{ | |
new Image($"test{a}", new ImageArgs | |
{ | |
ImageName = Output.Format($"{registry.LoginServer}/test{a}:v1.0.5"), | |
Build = new DockerBuild {Context = $"./node-app"}, | |
Registry = new ImageRegistry | |
{ | |
Server = registry.LoginServer, | |
Username = adminUsername, | |
Password = adminPassword | |
}, | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment