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.