Docker Community Forums

Share and learn in the Docker community.

Where is the dockerfile when I do a docker pull?


(Blahster) #1

I did a docker pull on successfully and can see it’s listed in docker images.
However, I can’t build it because there’s no dockerfile in the current directory (where I issued the docker pull).
So, where does docker pull store the image?

I’m basically trying to do what’s mentioned in says it should be in /var/lib/docker.
In Docker for Mac, what does that map to?

(David Maze) #2

To answer the question in the subject line: the Dockerfile isn’t part of the image, and docker pull (or docker push) don’t know about it.

They’re stored in a somewhat hidden virtual machine, maybe even in /var/lib/docker within that, but the path on the Mac host is pretty obscured; it’s under your home directory.

Are you running the docker build command from the top of a git clone of that repository?

If you’ve docker pulled the referenced image already, do you actually need to rebuild it?

(Blahster) #3

Thank you @dmaze, I did a git clone.