mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
builder: avoid unset credentials in containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
287144db42
commit
effb2bd9d2
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ func (is *imageSource) getResolver(ctx context.Context, rfn resolver.ResolveOpti
|
|||
func (is *imageSource) getCredentialsFromSession(ctx context.Context) func(string) (string, string, error) {
|
||||
id := session.FromContext(ctx)
|
||||
if id == "" {
|
||||
return nil
|
||||
// can be removed after containerd/containerd#2812
|
||||
return func(string) (string, string, error) {
|
||||
return "", "", nil
|
||||
}
|
||||
}
|
||||
return func(host string) (string, string, error) {
|
||||
timeoutCtx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
|
|
Loading…
Add table
Reference in a new issue