Split build and push, and remove push code from run

This currently only changes the `gcp` target, but is the new
model - the `build` command will only do things locally, then
you need to `push` to an image store such as GCP or other ones
in order to `run` for platforms that cannot boot directly from
a local image.

Fix #1618

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-04-24 16:34:56 +01:00
parent d8531ef070
commit 2709ee88bc
10 changed files with 132 additions and 100 deletions

View File

@@ -22,7 +22,7 @@ brew cask install google-cloud-sdk
Or via source code:
```shell
wget https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-151.0.0-darwin-x86_64.tar.gz
curl -SsL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-151.0.0-darwin-x86_64.tar.gz
tar xzvf google-cloud-sdk-151.0.0-darwin-x86_64.tar.gz
./google-cloud-sdk/install.sh
```
@@ -50,12 +50,16 @@ Make sure to download the credentials in JSON format and store them somewhere sa
## Build an image
Add a `gcp` output line to your yaml config, see the example in `examples/gcp.yml`.
Add a `gcp-img` output line to your yaml config, see the example in `examples/gcp.yml`.
Then do `moby build myfile.yml`
This will create a local `myfile.img.tar.gz` compressed image file, upload it to the
specified bucket, and create a bootable image.
This will create a local `myfile.img.tar.gz` compressed image file.
## Push image
Do `moby push gcp -project myproject-1234 -bucket bucketname myfile.img.tar.gz` to upload it to the
specified bucket, and create a bootable image from the stored image.
## Create an instance and connect to it