2014-04-15 20:53:12 -04:00
|
|
|
page_title: Installation on Google Cloud Platform
|
2014-05-27 13:08:19 -04:00
|
|
|
page_description: Installation instructions for Docker on the Google Cloud Platform.
|
2014-04-15 20:53:12 -04:00
|
|
|
page_keywords: Docker, Docker documentation, installation, google, Google Compute Engine, Google Cloud Platform
|
|
|
|
|
2014-04-23 16:48:28 -04:00
|
|
|
# Google Cloud Platform
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-27 18:51:05 -04:00
|
|
|
## 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:
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-07-07 12:35:38 -04:00
|
|
|
$ curl -sSL https://sdk.cloud.google.com | bash
|
2014-06-06 16:11:21 -04:00
|
|
|
$ gcloud auth login
|
2014-06-16 12:13:23 -04:00
|
|
|
$ gcloud config set project <google-cloud-project-id>
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-27 18:51:05 -04:00
|
|
|
3. Start a new instance using the latest [Container-optimized image][4]:
|
|
|
|
(select a zone close to you and the desired instance size)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-06-06 16:11:21 -04:00
|
|
|
$ gcloud compute instances create docker-playground \
|
2014-07-15 20:41:59 -04:00
|
|
|
--image https://www.googleapis.com/compute/v1/projects/google-containers/global/images/container-vm-v20140710 \
|
2014-06-06 16:11:21 -04:00
|
|
|
--zone us-central1-a \
|
|
|
|
--machine-type f1-micro
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-27 18:51:05 -04:00
|
|
|
4. Connect to the instance using SSH:
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-06-06 16:11:21 -04:00
|
|
|
$ gcloud compute ssh --zone us-central1-a docker-playground
|
2014-07-15 00:02:12 -04:00
|
|
|
$$ docker-playground:~$ sudo docker run hello-world
|
|
|
|
Hello from Docker.
|
|
|
|
This message shows that your installation appears to be working correctly.
|
|
|
|
...
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-27 18:51:05 -04:00
|
|
|
Read more about [deploying Containers on Google Cloud Platform][5].
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-05-27 18:51:05 -04:00
|
|
|
[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
|