Merge pull request #6100 from SvenDowideit/pr_out_docs_installation_google_update_to_use_container_vm_images

docs/installation/google: update to use container-vm images
This commit is contained in:
Sven Dowideit 2014-05-29 11:41:43 +10:00
commit 8622641b58
1 changed files with 25 additions and 32 deletions

View File

@ -4,52 +4,45 @@ page_keywords: Docker, Docker documentation, installation, google, Google Comput
# Google Cloud Platform
1. Go to [Google Cloud Console](https://cloud.google.com/console) and
create a new Cloud Project with [Compute Engine
enabled](https://developers.google.com/compute/docs/signup).
2. Download and configure the [Google Cloud SDK](
https://developers.google.com/cloud/sdk/) to use your project
with the following commands:
## QuickStart with Container-optimized Google Compute Engine images
1. Go to [Google Cloud Console][1] and create a new Cloud Project with
[Compute Engine enabled][2]
2. Download and configure the [Google Cloud SDK][3] to use your
project with the following commands:
```
$ curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash
$ gcloud auth login
Enter a cloud project id (or leave blank to not set): <google-cloud-project-id>
```
3. Start a new instance, select a zone close to you and the desired
instance size:
```
$ gcutil addinstance docker-playground --image=backports-debian-7
1: europe-west1-a
...
4: us-central1-b
>>> <zone-index>
1: machineTypes/n1-standard-1
...
12: machineTypes/g1-small
>>> <machine-type-index>
```
4. Connect to the instance using SSH:
3. Start a new instance using the latest [Container-optimized image][4]:
(select a zone close to you and the desired instance size)
```
$ gcutil ssh docker-playground
$ docker-playground:~$
$ gcloud compute instances create docker-playground \
--image projects/google-containers/global/images/container-vm-v20140522 \
--zone us-central1-a \
--machine-type f1-micro
```
5. Install the latest Docker release and configure it to start when the
instance boots:
4. Connect to the instance using SSH:
```
$ docker-playground:~$ curl get.docker.io | bash
$ docker-playground:~$ sudo update-rc.d docker defaults
$ gcloud compute ssh --zone us-central1-a docker-playground
```
```
docker-playground:~$ sudo docker run busybox echo 'docker on GCE \o/'
docker on GCE \o/
```
6. Start a new container:
Read more about [deploying Containers on Google Cloud Platform][5].
```
$ docker-playground:~$ sudo docker run busybox echo 'docker on GCE \o/'
$ docker on GCE \o/
```
[1]: https://cloud.google.com/console
[2]: https://developers.google.com/compute/docs/signup
[3]: https://developers.google.com/cloud/sdk
[4]: https://developers.google.com/compute/docs/containers#container-optimized_google_compute_engine_images
[5]: https://developers.google.com/compute/docs/containers