-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Description
Using docker v1.14.0 (master) I see this:
$ docker pull gcr.io/kubernetes-helm/tiller:v2.1.3
Error response from daemon: target is unknown
After some digging, this error is coming from:
https://github.com/docker/docker/blob/master/distribution/pull_v2.go#L366
if !allowedMediatype {
configClass := mediaTypeClasses[m.Manifest.Config.MediaType]
if configClass == "" {
configClass = "unknown"
}
return false, fmt.Errorf("target is %s", configClass)
}
And the MediaType being returned from gcr.io is "text/html".
I believe in older version of this code we never checked the mediaType to see if its valid and that's why this works on older Dockers. I'm in talks with the gcr.io guys to see if they can fix their code so that they return a valid value, but in the meantime we may want to consider being more forgiving in our code to allow for non-compliant registries.
Or, in @stevvooe's words:
we should probably have a set of media types that revert to some default (like schema2)
stevvooe, boaz0, bocytko, kabakaev, mstrzele and 2 more