I only recently ran across this variation of "docker build", which doesn't *seem* to be explained completely in the man page. From here: http://container42.com/2014/11/18/data-only-container-madness/ I saw the sample command: ~: docker build -t mickey_foo -< Dockerfile I was a bit confused as to what was going on until I read the explanation here: https://docs.docker.com/reference/builder/ "Note: If you build by passing a Dockerfile through STDIN (docker build - < somefile), there is no build context, so the Dockerfile can only contain a URL based ADD instruction. You can also pass a compressed archive through STDIN: (docker build - < archive.tar.gz), the Dockerfile at the root of the archive and the rest of the archive will get used at the context of the build." This doesn't *seem* to be explained in "man docker-build", and it seems like a moderately useful variation. Should it be covered there?
One more note about the above -- the current man page states: "When the URL to a tarball archive or to a single Dockerfile is given, no context is sent from the client to the Docker daemon." The builder reference page states a bit more informatively that, if you pass a remote archive as the URL, the entire archive is used as the context. Technically, I guess both those statements can be considered true, but it seems it would be more useful to mention that the archive would be used as the context in that case.
ACK, one more note on "man docker-build" I just noticed ... under "Building an image and naming that image", there are a number of examples that don't supply a final argument, such as: $ docker build -t fedora/jboss:1.0 ^ ?Final argument? AFAIK, you *must* supply an argument, such as "." for current directory; that is not the default. If you don't, you get: $ docker build -t rday/nginx docker: "build" requires 1 argument. See 'docker build --help'. Usage: docker build [OPTIONS] PATH | URL | - There are a few examples in that man page section that need to be fixed to have a final argument, yes? OK, I think I'm done here.
https://github.com/docker/docker/pull/16722 submitted
https://github.com/docker/docker/pull/16722 merged
Fixed in docker-1.9.