Skip to content

Commit d8db748

Browse files
author
OpenShift Bot
committed
Merge pull request #9104 from smarterclayton/dont_pull_all
Merged by openshift-bot
2 parents b42bfc3 + 020d51f commit d8db748

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pkg/util/docker/dockerfile/builder/client.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,12 @@ func (e *ClientExecutor) LoadImage(from string) (*docker.Image, error) {
280280
return nil, docker.ErrNoSuchImage
281281
}
282282

283-
repository, _ := docker.ParseRepositoryTag(from)
283+
repository, tag := docker.ParseRepositoryTag(from)
284+
if len(tag) == 0 {
285+
tag = "latest"
286+
}
284287

285-
glog.V(4).Infof("attempting to pull %s with auth from repository %s", from, repository)
288+
glog.V(4).Infof("attempting to pull %s with auth from repository %s:%s", from, repository, tag)
286289

287290
// TODO: we may want to abstract looping over multiple credentials
288291
auth, _ := e.AuthFn(repository)
@@ -298,7 +301,7 @@ func (e *ClientExecutor) LoadImage(from string) (*docker.Image, error) {
298301
for _, config := range auth {
299302
// TODO: handle IDs?
300303
// TODO: use RawJSONStream:true and handle the output nicely
301-
if err = e.Client.PullImage(docker.PullImageOptions{Repository: from, OutputStream: e.Out}, config); err == nil {
304+
if err = e.Client.PullImage(docker.PullImageOptions{Repository: from, OutputStream: e.Out, Tag: tag}, config); err == nil {
302305
break
303306
}
304307
lastErr = err

0 commit comments

Comments
 (0)