DockerCLI/command
Sebastiaan van Stijn bfd9613e5f 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 <github@gone.nl>
2017-01-24 17:44:44 +01:00
..
bundlefile Reinstate --bundle-file argument to 'docker deploy' 2016-11-10 11:28:18 -05:00
checkpoint Print checkpoint id when creating a checkpoint 2016-12-01 23:30:14 -05:00
commands Give a order to AddCommands, for easy read and maintenance. 2016-12-08 16:43:14 +08:00
container fix flag descriptions for content-trust 2017-01-23 14:52:36 +01:00
formatter Merge pull request #30378 from mlaventure/fix-negative-size 2017-01-24 09:24:53 -05:00
idresolver service ps: Truncate Task IDs 2016-11-08 16:17:15 -08:00
image do not ignore local build-contexts starting with "github.com" 2017-01-24 17:44:44 +01:00
inspect Move templates to pkg/templates 2016-12-12 09:34:03 +01:00
network Merge pull request #29226 from yongtang/28535-prune-until-follow-up 2017-01-09 17:58:01 +01:00
node Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
plugin Merge pull request #30211 from thaJeztah/fix-content-trust-flags 2017-01-23 23:52:11 +01:00
prune Add `--filter until=<timestamp>` for `docker container/image prune` 2017-01-04 14:16:42 -08:00
registry change minor mistake of spelling 2016-12-20 21:05:19 +08:00
secret remove -f on secret create and unify usage with other commands 2017-01-06 14:07:48 -08:00
service Add SecretUpdate method to client 2017-01-13 09:51:05 -08:00
stack Few stack deploy network fixes 2017-01-10 10:29:09 +01:00
swarm Allow swarm init with `--availability=drain` 2017-01-10 16:31:51 -08:00
system return error when listNode fails 2017-01-19 14:02:06 +08:00
task Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
volume Merge pull request #26830 from dnephin/man-desc-in-files 2017-01-03 17:47:49 +01:00
cli.go Add some unit tests to the node and swarm cli code 2017-01-09 18:30:15 +01:00
events_utils.go Add subcommand prune to the container, volume, image and system commands 2016-09-29 07:42:53 -07:00
in.go Fix the incorrect description for NewInStream 2016-10-13 22:33:09 +08:00
out.go Windows: OCI process struct convergence 2016-09-19 10:34:31 -07:00
registry.go Add registry-specific credential helper support 2016-12-01 10:29:00 -08:00
trust.go fix flag descriptions for content-trust 2017-01-23 14:52:36 +01:00
utils.go Windows: Use sequential file access 2017-01-23 10:25:36 -08:00