Containerized Deployment Essentials Flashcards
What is Docker?
A software platform that allows you to create, run, and manage containers on any host system where Docker is installed. In a cloud context, you use Docker to create images locally and then deploy them using cloud services (like Cloud Run) that manage running those containers for you.
What is Google Cloud Run?
A fully managed compute platform that automatically scales your stateless containers. It abstracts away the underlying infrastructure.
What is the purpose of a Dockerfile in the Docker ecosystem?
A Dockerfile is a script containing commands that Docker uses to build a Docker image. It specifies the base image to use, the files to add to the image, and the commands to run.
What are the basic steps to build a Docker image from a Dockerfile?
- Create a Dockerfile, that has necessary packages, copies over the source code, does app build in the container, sets up nginx in the container, runs nginx with ENTRYPOINT
- Run the docker build command with the appropriate tags and path to the Dockerfile.
What are the key benefits of using Google Cloud Run for deploying containerized applications?
No need to manage servers or clusters; Automatic scaling; Concurrency; Paying only for the resources you use.
How does a container differ from a virtual machine?
You run an image in a container, which ensures consistency across different environments—if an image can be built and run on one machine, it should behave identically on another. Containers are lightweight as they share the host OS and only package the application and its immediate dependencies. In contrast, virtual machines include full copies of an operating system, which makes them heavier but allows for greater isolation and security. This also means VMs require more resources, but they provide extensive configuration options that can be advantageous in environments where control over the virtual hardware is necessary.
What is service vs project in Google Cloud Run?
A “service” is a deployable unit of code that runs a stateless container, while a “project” is a container for all Cloud resources, providing settings, permissions, and billing for a group of services.
What is GCP Artifact Container Registry?
Google Cloud Artifact Registry is a single place to manage container images and language packages (artifacts). It supports Docker container registries as well as Maven and npm package repositories.
What is container?
Containers are a form of operating system virtualization that allows applications to run in isolated environments, ensuring consistency across multiple deployment environments.
Nature: Mutable and can have a writable layer on top of the image.
Purpose: To run applications in an isolated environment. It’s a running instance of the image, actively executing processes.
Lifecycle: Created, started, stopped, and deleted as needed. Changes in a container are not saved back to the image.
What is runtime?
The environment in which a program or application is executed. It includes software, libraries, and services that provide program instructions to the system’s physical hardware.
What is the difference between terms deploy vs push?
“Push” refers to uploading your local image to a registry like Docker Hub or GCP Artifact Registry. “Deploy” involves taking the pushed image and running it as a service or application in a production environment.
What is an image?
A lightweight, standalone, and executable software package that includes everything needed to run a piece of software, such as the code, runtime, libraries, environment variables, and configuration files.
Nature: Read-only and immutable.
Purpose: Serves as a blueprint for creating containers. Think of it as a class definition in object-oriented programming.
Lifecycle: Built once and can be distributed to multiple environments.