Where does Docker know where to pull the .sh scripts from when building a Dockerfile?

So here is a Dockerfile. https://hub.docker.com/r/kartoza/postgis/~/dockerfile/

I am trying to use this in my Docker-Compose like so:

  • How to dockerize individual apps inside Hadoop in multi tenant environment?
  • How to keep a data store portable in Docker?
  • Unable to connect to dockerized mysql db remotely
  • Can't install minimesos on Vagrant — Failed to run command 'up'. null
  • How can I connect my docker to the internet?
  • Docker not releasing ports
  • postgres:
    
      restart: always
    
      image: kartoza/postgis:9.4-2.1
    
      ports:
    
        - "5432:5432"
    

    My question is, if you go back to that link and look at the Dockerfile, at the very bottom it is running start_postgres.sh and some other sh scripts. How does docker know where to pull those sh scripts from? I know there is a Kartoza/postgis github repo that has the scripts, but nowhere in the Dockerfile or my docker-compose is there any step to pull or point to the GitHub repo so I am totally confused where these scripts are pulled from when I run my docker-compose.

    volumes:

    - pgdata:/var/lib/postgresql/data/
    

  • Using Consul, how can I assign domain names to containers?
  • How to ssh from centos 6.4 into a docker container without a password?
  • Cucumber on Travis CI container
  • Can I release some memory of a running Docker container on the fly?
  • Shared Memory with Docker containers (docker version 1.4.1)
  • Docker HTML publishing
  • One Solution collect form web for “Where does Docker know where to pull the .sh scripts from when building a Dockerfile?”

    The Dockerfile on Dockerhub is just for documentation purposes, the complete github repo is used to build the image, hence the scripts are available through Docker’s build context:

    $ docker build https://github.com/kartoza/docker-postgis
    

    Only using the linked Dockerfile will result in a build error.

    Edit: To clarify, Docker Hub is an image repository. Built images are either uploaded or built by Docker Hub from a provided github repository. Other users can then simply download (pull) those images.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.