Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Carael committed Aug 28, 2024
1 parent f23216b commit e96e63f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Core/ContainerResourceOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,15 @@ private static void AddLocalDockerAuthentication(DockerConfiguration containerCo
{
foreach (var auth in dockerAuthRootObject.Auths)
{
var address = new Uri(auth.Key);
if(!Uri.TryCreate(auth.Key, UriKind.RelativeOrAbsolute, out Uri address))
{
continue;
}

if (containerConfig.Registries.Any(p =>
p.Address.Equals(address.ToString(), StringComparison.InvariantCultureIgnoreCase)))
p.Address.Equals(address.ToString(), StringComparison.InvariantCultureIgnoreCase)) ||
string.IsNullOrEmpty(auth.Value.Email) ||
string.IsNullOrEmpty(auth.Value.Auth))
{
continue;
}
Expand Down

0 comments on commit e96e63f

Please sign in to comment.