diff --git a/pkg/devspace/configure/image.go b/pkg/devspace/configure/image.go index 961ffc5e2c..e45456900e 100644 --- a/pkg/devspace/configure/image.go +++ b/pkg/devspace/configure/image.go @@ -174,7 +174,7 @@ func (m *manager) AddImage(imageName, image, projectNamespace, dockerfile string registryHostname, err = m.log.Question(&survey.QuestionOptions{ Question: "Please provide the registry hostname without the image path (e.g. gcr.io, ghcr.io, ecr.io)", DefaultValue: "gcr.io", - ValidationRegexPattern: "^(?!-)[a-z0-9-]{1,63}(\\.[a-z0-9-]{1,63})*$", + ValidationRegexPattern: "^[a-z0-9][a-z0-9-]{0,62}(\\.[a-z0-9-]{1,63})*$", ValidationMessage: "Error parsing registry hostname: must only include letters, digits, dots and hyphens and cannot exceed 253 characters.", }) if err != nil {