moby/cli/command
Ian Campbell 5894bc1abf 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 16:35:54 +01:00
..
bundlefile Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
checkpoint Use formatter in docker checkpoint ls 2017-03-19 09:24:15 +02:00
commands Give a order to AddCommands, for easy read and maintenance. 2016-12-08 16:43:14 +08:00
container Merge pull request #32504 from dongluochen/healthcheck_duration 2017-04-27 23:54:00 -04:00
formatter Add format to docker stack ls 2017-04-25 16:45:30 +03:00
idresolver Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
image Add docker build --iidfile=FILE 2017-05-05 16:35:54 +01:00
inspect Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
network Add label filter for docker system prune 2017-04-06 09:11:25 -07:00
node Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
plugin Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
prune Add label filter for docker system prune 2017-04-06 09:11:25 -07:00
registry Replace fmt.Errorf() with errors.Errorf() in the cli 2017-03-24 16:58:07 -04:00
secret Remove pkg/testutil/assert in favor of testify 2017-04-14 12:03:21 -07:00
service Merge pull request #32876 from YuPengZTE/devIneffectualAssignment 2017-05-03 20:55:57 +02:00
stack Merge pull request #32843 from ehazlett/stack-service-filter 2017-05-02 14:10:20 +02:00
swarm Merge pull request #32828 from cyli/external-ca-cert 2017-04-28 10:30:57 -04:00
system Merge pull request #32540 from cpuguy83/add_logdrivers_to_info 2017-04-25 23:25:30 -05:00
task Add --format to docker service ps 2017-02-10 16:53:04 -08:00
volume Unit tests for cli/commands/image (except build and tag) 2017-04-23 12:27:39 -05:00
cli.go Unit tests for cli/commands/image (except build and tag) 2017-04-23 12:27:39 -05: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 docker run -it on windows 2017-04-25 18:25:05 +02:00
out.go Fix docker run -it on windows 2017-04-25 18:25:05 +02:00
registry.go Unit tests for cli/commands/image (except build and tag) 2017-04-23 12:27:39 -05:00
stream.go Fix docker run -it on windows 2017-04-25 18:25:05 +02:00
trust.go fix flag descriptions for content-trust 2017-01-23 14:52:36 +01:00
utils.go Add label filter for docker system prune 2017-04-06 09:11:25 -07:00