GCP image handling enhancements

- the `public` option was not previously implemented
- add `replace` only for GCP images which will error otherwise. Only
  recommended for use in development, in production use the `--name` option
  to provide a different name eaxch time. Note only applies to GCP images,
  will document these options properly soon.
- add a `family` option; this allows you to upload many images and the
  user can select the latest using the `family` option instead of a specific
  image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-03-16 13:08:37 +00:00
parent 7149da4b4f
commit ee76e8bdfd
3 changed files with 25 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ func outputs(m *Moby, base string, bzimage []byte, initrd []byte) error {
if err != nil {
return fmt.Errorf("Error copying to Google Storage: %v", err)
}
err = imageGS(base, o.Project, "https://storage.googleapis.com/"+o.Bucket+"/"+base+".img.tar.gz")
err = imageGS(base, o.Project, "https://storage.googleapis.com/"+o.Bucket+"/"+base+".img.tar.gz", o.Family, o.Replace)
if err != nil {
return fmt.Errorf("Error creating Google Compute Image: %v", err)
}