do not ignore local build-contexts starting with "github.com"
do not ignore local build-contexts starting with "github.com"

Docker special-cases build-contexts starting with `github.com`, and
treats them as remote URLs.

Because of this special treatment, local build contexts in a directory
named "github.com" are ignored by `docker build`.

This patch changes the way the build-context is detected and first
checks if a local path with the given name exists before considering
it to be a remote URL.

Before this change;

    $ mkdir -p github.com/foo/bar && echo -e "FROM scratch\nLABEL iam=local" > github.com/foo/bar/Dockerfile

    $ docker build -t dont-ignore-me github.com/foo/bar
    Username for 'https://github.com':

After this change;

    $ mkdir -p github.com/foo/bar && echo -e "FROM scratch\nLABEL iam=local" > github.com/foo/bar/Dockerfile

    $ docker build -t dont-ignore-me github.com/foo/bar
    Sending build context to Docker daemon 2.048 kB
    Step 1/2 : FROM scratch
     --->
    Step 2/2 : LABEL iam local
     ---> Using cache
     ---> ae2c603fe970
    Successfully built ae2c603fe970

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

gdevillele/cli,Zebrilee/cli,docker/cli,ashfall/cli,e11137/cli,riyazdf/cli,dnephin/cli,dnephin/cli,ashfall/cli,thaJeztah/cli,cpuguy83/cli,redpanda/cli,allencloud/cli,allencloud/cli,e11137/cli,docker/cli,redpanda/cli,Zebrilee/cli,riyazdf/cli,cpuguy83/cli,thaJeztah/cli