DockerCLI/cli/command
Ian Campbell c3648a9c94 Add `docker build --iidfile=FILE`
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-05-05 12:12:36 -07:00
..
bundlefile Import docker/docker/cli 2017-04-17 17:40:59 -04:00
checkpoint Update imports. 2017-04-17 18:07:56 -04:00
commands Update imports. 2017-04-17 18:07:56 -04:00
container do not allow duration less than 1 ms in healthcheck parameters 2017-05-03 17:46:40 -07:00
formatter Add format to docker stack ls 2017-05-03 18:41:19 -07:00
idresolver Update imports. 2017-04-17 18:07:56 -04:00
image Add `docker build --iidfile=FILE` 2017-05-05 12:12:36 -07:00
inspect Update imports. 2017-04-17 18:07:56 -04:00
network Add gocycle lint 2017-05-02 17:57:46 -04:00
node Enable golint 2017-05-02 17:57:46 -04:00
plugin Update imports. 2017-04-17 18:07:56 -04:00
prune Update imports. 2017-04-17 18:07:56 -04:00
registry Update imports. 2017-04-17 18:07:56 -04:00
secret Update imports. 2017-04-17 18:07:56 -04:00
service Refacator pkg/streamformatter 2017-05-03 18:49:14 -07:00
stack remove service runtime filter in stack command 2017-05-03 18:45:48 -07:00
swarm Inroduce SWARM --data-path-addr flag 2017-05-03 18:45:48 -07:00
system Add logdrivers to /info 2017-05-03 17:46:39 -07:00
task Add ineffassign linter. 2017-05-02 17:57:46 -04:00
volume Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
cli.go Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
events_utils.go Add deadcode linter. 2017-05-02 17:57:46 -04:00
in.go Fix docker run -it on windows 2017-05-03 18:41:19 -07:00
out.go Fix docker run -it on windows 2017-05-03 18:41:19 -07:00
registry.go Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
stream.go Fix docker run -it on windows 2017-05-03 18:41:19 -07:00
trust.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
utils.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00