hands-on lab

Develop, Build and Deploy a Container Application on Google Compute Engine

Difficulty: Intermediate
Duration: Up to 1 hour
Students: 226
Rating: 4.2/5
On average, students complete this lab in50m
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Recently, the popularity of containerized applications has been growing because containers offer portability, allow multiple applications to run on the same host, and provide hardware platform independence. Docker is the most widely used container engine. In this lab, you will create a Python application and a Dockerfile, then use Cloud Build to create a Docker image and store it in Artifact Registry. You will deploy the image to a Compute Engine VM running Container-Optimized OS (COS), which includes a container runtime. A startup script runs the application container without using the deprecated container startup agent. If you want more information about this OS, follow this link.

 

Containerized applications are portable and can run consistently across different environments. In this lab, you will create a Python application and a Dockerfile, then use Cloud Build to build a Docker image and store it in Artifact Registry. You will deploy that image to a standard Debian-based Compute Engine VM running Docker, then create a VPC firewall rule to allow public traffic to the application on port 8080.

Learning Objectives

Upon completion of this lab you will be able to:

  • Create an application and build a Docker image that represents it
  • Deploy a container application to a Google Compute Engine instance
  • Allow public traffic to the container application

Intended Audience

This lab is intended for:

  • Google Cloud Professional Cloud Developer (PCD) certification candidates
  • Individuals who want to improve their skills with container application deployment
  • Solutions architects who want to migrate their existing applications into containers

Prerequisites

Basic knowledge of Docker is a plus but it is not required.

Environment before

Environment after

Covered topics

Hands-on Lab UUID

Lab steps

0 of 6 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. Signing In to the Google Cloud Console
  2. Creating a Sample Python Application
  3. Containerizing a Python Application using Cloud Build
  4. Deploying a Containerized Application to a Compute Engine Instance
  5. Allowing Traffic to the Application
  6. Testing the Container Application Functionality