We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dffdb4 commit 6113528Copy full SHA for 6113528
pkg/docker_registry/generic_api.go
@@ -4,6 +4,7 @@ import (
4
"context"
5
"fmt"
6
"net/url"
7
+ "strings"
8
"sync"
9
10
"github.com/google/go-containerregistry/pkg/name"
@@ -143,7 +144,14 @@ func (api *genericApi) getOrCreateRegistryMirrors(ctx context.Context) ([]string
143
144
}
145
146
mirrorsFromEnv := util.PredefinedValuesByEnvNamePrefix("WERF_CONTAINER_REGISTRY_MIRROR_")
- mirrors = append(mirrors, mirrorsFromEnv...)
147
+
148
+ for _, mirror := range mirrorsFromEnv {
149
+ if !strings.HasPrefix("http://", mirror) && !strings.HasPrefix("https://", mirror) {
150
+ mirror = "https://" + mirror
151
+ }
152
153
+ mirrors = append(mirrors, mirror)
154
155
156
api.mirrors = &mirrors
157
0 commit comments