As you know, the Dockerfile is the source code from which the image is built. That is not stored on Docker Hub so you don’t get access to that. That is stored in a source code management system somewhere. Docker Hub is an artifact repository. It stores the artifacts from the build which, in the case of Docker, is a container image. The already built image is all you get when you use docker pull <image-name>. No need to build anything because it is the already built layers that get pulled down.