Docker Community Forums

Share and learn in the Docker community.

Where does docker pull the base image layer?

Hi, I used the following Dockerfile, build an image named as, for example “”. And I pushed this image to my own docker registry “”.

FROM alpine:3.12.3 as final
RUN apk add --no-cache git wget curl

Then in a new machine with empty docker cache, when I pull the image, where will docker pull the base image layer? Will docker pull alpine:3.12.3 from docker hub or my own docker registry?

Thank you in advance!

TLDR; Layers of a Docker image are essentially just files generated from running some command. You can view the contents of each layer on the Docker host at /var/lib/docker/aufs/diff .

Thanks for the info. Does this mean when I pull an image from a registry, all layers of this image will be pulled from this registry only? If this image is built on top of some other registry’s image, will other registry’s image get pulled?