distgo icon indicating copy to clipboard operation
distgo copied to clipboard

Add documentation for --tags flag for docker build

Open nmiyake opened this issue 7 years ago • 1 comments

It is unclear that the --tags flag expects a key from the tags-template config block. As is there are a couple of undesired behaviors:

  1. If the tag does not exist, there's no warning (even in verbose). Docker build just does not execute. But the command is successful. For example:
~/go/src/github.com/org/project$ ./godelw docker build --dry-run --tags github.com/org/product --verbose  product-test-server
[DRY RUN] Creating distribution for product-test-server at test-server/build/distributions/product-test-server/0.24.0-27-gf794738.dirty/bin/product-test-server-0.24.0-27-gf794738.dirty.tgz
[DRY RUN] Finished creating bin distribution for product-test-server
~/go/src/github.com/org/project$
  1. The --tags flag behaves differently from the --tag flag in vanilla docker build. With the lack of documentation of what --tags actually is, I believe a reasonable default assumption is to assume proxying towards the underlying command (in this case docker).
Flags:
      --dry-run             print the operations that would be performed
  -h, --help                help for build
      --repository string   specifies the value that should be used for the Docker repository (overrides any value(s) specified in configuration)
      --tags stringSlice    
      --verbose             print verbose output for the operation

nmiyake avatar Aug 14 '18 20:08 nmiyake

Agree that more documentation would be better here. Will get to it when I can, but also happy to accept a PR :)

nmiyake avatar Aug 14 '18 20:08 nmiyake