1

I have a very simple dockerfile

FROM makuk66/docker-solr
MAINTAINER test

Which I then build using

docker build -t myimage/test .

From what I know about Docker when I type docker images it should only show myimage/test under REPOSITORY; however this is not what happens. Instead, I see:

REPOSITORY            TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
myimage/test          latest              566ef17fc0bc        15 hours ago        1.034 GB
makuk66/docker-solr   latest              bdd8b134dd2d        6 days ago          1.034 GB

Why is the base image appearing? The repository that I am pulling from for example has

FROM java:8

But this doesn't appear. So in this case why is the base image there?

m0meni
  • 16,006
  • 16
  • 82
  • 141

1 Answers1

3

Your docker build command will do this:

  • Search "makuk66/docket-solr" in local, if it cannot find it, then it will try to download it from docker-hub
  • Build a layer on top of it with MAINTAINER info and if successful, this will commit it with the image name "myimage/test"

So you are supposed to see both the images.

Chandan Nayak
  • 10,117
  • 5
  • 26
  • 36
  • Ok so my concern is that both images is that both images are taking up 1.034 GB. Is this actually the case? And if it is, is there a better way for me to build my own docker based from that image? – m0meni Jun 02 '15 at 19:24
  • http://stackoverflow.com/questions/24394243/why-are-docker-container-images-so-large - might help – Chandan Nayak Jun 02 '15 at 20:38