Commands from the video

Cloud shell - set compute/zone

Note - Google Cloud shell is an ephemeral instance and will reset if you don't use it for more than 30 minutes. That is why you might have to set some configuration values again

gcloud compute zoneslist
gcloud configsetcompute/zone <zone>**

**

Cloud shell - launch a new VM instance

gcloud compute instancescreateubuntu \
--image-project ubuntu-os-cloud \
--image ubuntu-1604-xenial-v20160420c

Cloud shell - log into the VM instance

gcloudcompute ssh ubuntu**

**

VM instance - update packages and install nginx

sudo apt-getupdate
sudo apt-getinstallnginx
nginx -v**

**

VM instance - start nginx

sudosystemctl start nginx

Check that it's running

sudo systemctl status nginx

curl http://127.0.0.1

Commands to run (on the VM Instance)

Install Docker

sudo apt-getinstall docker.io**

**

Check Docker images

sudodocker images**

**

Pull nginx image

sudodockerpullnginx:1.10.0
sudodockerimages**

**

Verify the versions match

sudo dpkg -l | grep nginx

If your version of nginx from native package and Docker are different, you need to update the VM instance:

sudo apt-getupdate
sudo apt-getinstallnginx

Commands to run on the VM Instance

Run the first instance

sudodockerrun-dnginx:1.10.0**

**

Check if it's up

sudodocker ps**

**

Run a different version of nginx

sudodockerrun-dnginx:1.9.3**

**

Run another version of nginx

sudodockerrun-dnginx:1.10.0**

**

Check how many instances are running

sudo docker ps

sudo ps aux | grep nginx

results matching ""

    No results matching ""