Browse code

builder: avoid unset credentials in containerd

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2018/11/20 10:40:08
Showing 1 changed files
... ...
@@ -88,7 +88,10 @@ func (is *imageSource) getResolver(ctx context.Context, rfn resolver.ResolveOpti
88 88
 func (is *imageSource) getCredentialsFromSession(ctx context.Context) func(string) (string, string, error) {
89 89
 	id := session.FromContext(ctx)
90 90
 	if id == "" {
91
-		return nil
91
+		// can be removed after containerd/containerd#2812
92
+		return func(string) (string, string, error) {
93
+			return "", "", nil
94
+		}
92 95
 	}
93 96
 	return func(host string) (string, string, error) {
94 97
 		timeoutCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)