Use registry auth token from Call extensions to pull images (#1228)

This commit is contained in:
Vijay Krishnan
2018-09-20 13:57:41 -07:00
committed by Reed Allman
parent 31b09c2601
commit b2f85b70ea
3 changed files with 92 additions and 14 deletions

View File

@@ -36,7 +36,7 @@ type Auther interface {
// certain restrictions on images or if credentials must be acquired right
// before runtime and there's an error doing so. If these credentials don't
// work, the docker pull will fail and the task will be set to error status.
DockerAuth() (docker.AuthConfiguration, error)
DockerAuth() (*docker.AuthConfiguration, error)
}
type runResult struct {
@@ -310,7 +310,9 @@ func (drv *DockerDriver) ensureImage(ctx context.Context, task drivers.Container
if err != nil {
return err
}
config = &authConfig
if authConfig != nil {
config = authConfig
}
}
globalRepo := path.Join(reg, repo)