Can I create an instance template for a Container based OS Image

0 votes
I want to create an instance template such that when I use it, I should be able to launch a container when the OS starts. How do I configure this?
Sep 24, 2019 in GCP by Sam
• 6,260 points
1,174 views

1 answer to this question.

0 votes

You can specify a container image in an instance template. 

By default, Compute Engine also includes in the template a Container Optimised OS image with Docker installed. 

When you use the template to create a new instance, the container is launched automatically as the instance starts up.

  1. Go to the Instance Templates page.

  2. Click Create instance template.

  3. In the Container section, select the Deploy a container image to this VM instance checkbox.

  4. Specify the Container image to use.

    • For example, you can specify gcr.io/cloud-marketplace/google/nginx1:1.12 to select an NGINX 1.12 container image from Cloud Launcher.

    • If you use a container image from Docker Hub, always specify the full Docker image name. For example, specify the following image name to deploy an Apache container image: docker.io/httpd:2.4.

  5. Optionally, click Advanced container options

  6. Click Create.

answered Sep 24, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How do I create a preemptible virtual machine (VM) instance?

With gcloud compute, use the same instances create command that ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
1,217 views
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
2,645 views
0 votes
1 answer
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,040 views
0 votes
1 answer
0 votes
1 answer

Can I create a load balancer with path based routing in GKE?

Yes, it's possible. Note that you simply will use the internal Load balancing (ILB) for ...READ MORE

answered Oct 10, 2019 in GCP by Sirajul
• 59,230 points
971 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP