Skip to content

Commit

Permalink
remove docker registry string match
Browse files Browse the repository at this point in the history
  • Loading branch information
Aishwarya-Lad committed Jul 10, 2024
1 parent 6cade1e commit bee4212
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/docker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"strings"
)

const (
Expand Down Expand Up @@ -50,7 +49,7 @@ func (c *Config) SetCredHelper(registry, helper string) {

func (c *Config) CreateDockerConfigJson(credentials []RegistryCredentials) ([]byte, error) {
for _, cred := range credentials {
if cred.Registry != "" && strings.Contains(cred.Registry, "docker") {
if cred.Registry != "" {

if cred.Username == "" {
return nil, fmt.Errorf("Username must be specified for registry: %s", cred.Registry)
Expand Down

0 comments on commit bee4212

Please sign in to comment.