Run Containers

Dennis Kibbe
Mesa Community College

Module Overview

Learning Objectives

After successfully completing the work in this module you will be able to:

... stuff that only appears in the handouts ...

Introduction to Containers

a container is an encapsulated process that includes the required runtime dependencies for the program to run. In a container, application-specific libraries are independent of the host operating system libraries.

Describing Containers

... stuff that only appears in the handouts ...

Comparing Containers to Virtual Machines

Hypervisors, such as KVM, Xen, VMware, and Hyper-V, are applications that provide the virtualization functionality for VMs. The container equivalent of a hypervisor is a container engine, such as Podman.

Container images are a stable target for developers. Software applications require specific versions of libraries to be available for deployment, which can result in dependency issues or specific OS requirements. Because libraries are included in the container image, a developer can be confident of no dependency issues in a deployment.

Quiz

Introduction to Containers

clipboard.png

... stuff that only appears in the handouts ...

Creating Containers with Podman

... stuff that only appears in the handouts ...

An Introduction to Podman

Podman is an open source tool that you can use to manage your containers locally.

Working with Podman

... stuff that only appears in the handouts ...

Pulling and Displaying Images

[user@host ~]$ podman pull registry.redhat.io/rhel9/rhel-guest-image:9.4
Trying to pull registry.redhat.io/rhel9/rhel-guest-image:9.4...
Getting image source signatures

... stuff that only appears in the handouts ...

Listing Containing Images

[user@host ~]$ podman images
REPOSITORY                        TAG         IMAGE ID      CREATED       SIZE
registry.redhat.io/rhel9/rhel-guest-image     9.4         52617ef413bd  2 weeks ago   216 MB

... stuff that only appears in the handouts ...

Running and Displaying Containers

[user@host ~]$ podman run registry.redhat.io/rhel9/rhel-guest-image:9.4 \
echo 'Red Hat'
Red Hat

... stuff that only appears in the handouts ...

Guided Exercise

Creating Containers with Podman

Two children doing homework at a desk

Use Podman to pull container images from a registry and to use them to run containers.

Container Image Registries

A container image is a packaged version of your application, with all the dependencies that are necessary for the application to run. You can use image registries to store container images to later share them in a controlled manner.

Quay.io

you can use the Quay.io registry to store your custom images.

Guided Exercise

Container Image Registries

Two children doing homework at a desk

Use Podman to pull container images from a registry, and use the images to run containers.

Managing the Container Lifecycle

Podman provides a set of subcommands to create and manage containers. You can use those subcommands to manage the container and container image lifecycle.

Guided Exercise

Managing the Container Lifecycle

Two children doing homework at a desk

Use Podman to pull container images from a registry, and use the images to run containers.

Resources

Summary

Graded Lab

Run Containers

Two scientists with flask and clipboard

Use podman to pull a container image from a registry, and use the image to run a detached container.

End Slide

MCC logo