2015-06-07 20:07:20 -07:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
title = "Installation on Google Cloud Platform"
|
|
|
|
description = "Installation instructions for Docker on the Google Cloud Platform."
|
|
|
|
keywords = ["Docker, Docker documentation, installation, google, Google Compute Engine, Google Cloud Platform"]
|
|
|
|
[menu.main]
|
|
|
|
parent = "smn_cloud"
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-04-23 23:48:28 +03:00
|
|
|
# Google Cloud Platform
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-05-27 15:51:05 -07: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-16 10:53:12 +10:00
|
|
|
|
2014-07-07 10:35:38 -06:00
|
|
|
$ curl -sSL https://sdk.cloud.google.com | bash
|
2014-06-06 13:11:21 -07:00
|
|
|
$ gcloud auth login
|
2014-06-16 09:13:23 -07:00
|
|
|
$ gcloud config set project <google-cloud-project-id>
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-05-27 15:51:05 -07: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-16 10:53:12 +10:00
|
|
|
|
2014-06-06 13:11:21 -07:00
|
|
|
$ gcloud compute instances create docker-playground \
|
2014-12-10 13:57:02 -08:00
|
|
|
--image container-vm \
|
2014-06-06 13:11:21 -07:00
|
|
|
--zone us-central1-a \
|
|
|
|
--machine-type f1-micro
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-05-27 15:51:05 -07:00
|
|
|
4. Connect to the instance using SSH:
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-06-06 13:11:21 -07:00
|
|
|
$ gcloud compute ssh --zone us-central1-a docker-playground
|
2014-10-06 15:28:50 -07:00
|
|
|
docker-playground:~$ sudo docker run hello-world
|
2014-07-15 14:02:12 +10:00
|
|
|
Hello from Docker.
|
|
|
|
This message shows that your installation appears to be working correctly.
|
|
|
|
...
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-05-27 15:51:05 -07:00
|
|
|
Read more about [deploying Containers on Google Cloud Platform][5].
|
2014-04-16 10:53:12 +10:00
|
|
|
|
2014-05-27 15:51:05 -07: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
|