Docker Community Forums

Share and learn in the Docker community.

Better error message when a required image has been deleted from the hub


(Dcycle) #1

When a required image has been deleted from the hub, the error message is:

666d59f8429d: Error pulling image (latest) from dockerfiles/centos-lamp, endpoin666d59f8429d: Error pulling image (latest) from dockerfiles/centos-lamp, ApplyLayer gzip: invalid header stdout: {"layerSize":300550566}
INFO[0058]  stderr:                                     

For example,

FROM dockerfiles/centos-lamp

depends on centos:6.4, which existed last week (so all worked fine), but centos:6.4 was deleted, and now we get the “Invalid header stdout” error when trying to use dockerfiles/centos-lamp.

Instead of the above error, it would be better IMO to have an error like this:

Error: Cannot use image dockerfiles/centos-lamp because centos:6.4, on which it depends, is no longer available on the Docker hub.

Ref: https://github.com/docker/docker/issues/14656


(Andy Rothfusz) #2

Could you let us know the output of docker version (not --version)? I wasn’t able to get exactly the error message you mentioned.

Here’s what I get when I try to use centos:6.4 directly (with docker 1.6):

(dkr)centos64$ docker build -t c64test .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon 
Step 0 : FROM centos:6.4
Pulling repository centos
INFO[0005] Tag 6.4 not found in repository centos    

and here’s what I get when I use docker 1.7.1:

root@c64test:~/c64test# docker build -t c64test .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon 
Step 0 : FROM centos:6.4
Pulling repository centos
Tag 6.4 not found in repository centos

and then trying FROM dockerfiles/centos-lamp with docker 1.7.1 (this one is weird – I wouldn’t expect it to work since the 6.4 image tag has been removed):

root@c64test:~/c64test# vi Dockerfile 
root@c64test:~/c64test# docker build -t c64test .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon 
Step 0 : FROM dockerfiles/centos-lamp
Pulling repository dockerfiles/centos-lamp
666d59f8429d: Download complete 
539c0211cd76: Download complete 
1b522efc5462: Download complete 
46d50bbca148: Download complete 
082a6a05108d: Download complete 
f1c190401f1a: Download complete 
987fe7539090: Download complete 
7bfe4ff4df41: Download complete 
720bdd4ad932: Download complete 
27a235cf3931: Download complete 
837dfe4536e0: Download complete 
f977418995c6: Download complete 
d638bd947021: Download complete 
dc5d255a48c7: Download complete 
b1089d528d27: Download complete 
bc3211f4cc3e: Download complete 
62d8c4d27eed: Download complete 
Status: Downloaded newer image for dockerfiles/centos-lamp:latest
 ---> 666d59f8429d
Step 1 : ADD . /
 ---> 66a94d2f1675
Removing intermediate container 13d34bd936f9
Successfully built 66a94d2f1675

(Dcycle) #3

Hi!

Here is my version:

lient version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d-dirty
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d-dirty
OS/Arch (server): linux/amd64

dockerfiles/centos-lamp is working again, I can confirm it.

Two days ago it was giving that error, see https://circleci.com/gh/alberto56/test20150715091543/1
Now it is working, see https://circleci.com/gh/alberto56/test20150715091543/3

Perhaps the maintainer changed the image to use the latest centos?

Regardless, the problem will re-occur in the future, anytime a base image relies on an image previously but no longer available.