mirror of https://github.com/docker/cli.git
bfd9613e5f
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> |
||
---|---|---|
.. | ||
bundlefile | ||
checkpoint | ||
commands | ||
container | ||
formatter | ||
idresolver | ||
image | ||
inspect | ||
network | ||
node | ||
plugin | ||
prune | ||
registry | ||
secret | ||
service | ||
stack | ||
swarm | ||
system | ||
task | ||
volume | ||
cli.go | ||
events_utils.go | ||
in.go | ||
out.go | ||
registry.go | ||
trust.go | ||
utils.go |