Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Managing Container Images Using Podman and Skopeo on RHEL

An essential part of managing containers is working with container images. In this lab, we install and configure a Podman environment and use Podman and Skopeo to manage container images in our environment. Upon completion, you can install and configure a Podman environment and use it to manage container images.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Apr 23, 2021

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install Podman Using yum or Application Streams

    1. Install podman on your RHEL server using yum. Alternatively, you can use Application Streams to install the container-tools package stream.

    Note: If you use Application Streams, make sure you use the default stream.

    2.We need to add 'localhost' to the empty line for [registries.insecure] in the /etc/containers/registries.conf file to specify our local container registry as an insecure registry. You'll need to do this using sudo.

  2. Challenge

    Start the Local Container Image Registry

    1. A local container image registry has been pre-configured on your server. Before we can use it, we need to start it.
    2. Run the script (registry.sh), provided in the cloud_user home directory. Run this script with sudo, as it requires root privilages.
  3. Challenge

    Manage Container Images Using Podman

    The podman command comes with quite a bit of container management functionality included. Let's try the following:

    1. Check your installed version of podman
    2. Check out the help information on the podman command
    3. Check out the help information on the podman image command
    4. Use podman to search for the ubi:latest container images
    5. Use podman to pull a copy of the registry.access.redhat.com/ubi8/ubi:latest container image
    6. Compare the podman images command to the podman image list command
    7. Compare the podman inspect ubi command to the podman image inspect ubi command
    8. Add the myubi tag to the ubi:latest image
    9. List our container images again
    10. Log in to the local container inage registry at localhost:5000
    11. Push the ubi:latest image in our local container image storage to the registry running on our lab server
      • Tag the ubi:latest image with the target of localhost:5000/ubi8/ubi
      • Push the image to localhost:5000/ubi8/ubi:latest
        • Use the --remove-signatures switch
    12. Check the local registry's contents using curl -u cloud_user https://localhost:5000/v2/_catalog and the cloud_user password
    13. Remove the myubi tag
    14. List our container images again
    15. Remove the image with no tags using the imageID
    16. List our container images again
    17. Use podman to search our local registry
    18. Using podman, log out of the local container registry
  4. Challenge

    Manage Container Images Using Skopeo

    Even though the podman command can be used to perform container image management, taking things to the next level requires skopeo. Let's try the following with skopeo:

    1. Check your installed version of skopeo
    2. Check out the help information on the skopeo command
    3. Check out the help information on the skopeo inspect command
    4. Use skopeo to log in to the local container image registry at localhost:5000
    5. Use skopeo to copy a container image directly from docker://registry.access.redhat.com/ubi7/ubi:latest to our local registry (docker://localhost:5000/ubi7/ubi)
    6. Check the local registry's contents using curl -u cloud_user https://localhost:5000/v2/_catalog and the cloud_user password
    7. Use skopeo to sync a container image from docker://registry.access.redhat.com/ubi7/ubi:latest to our local registry (docker://localhost:5000/ubi7/ubi)
    8. Use skopeo to inspect the ubi7 and ubi8 images on the local container registry
    9. Use skopeo to list the tags on the ubi7 and ubi8 images on the local container registry
    10. Use podman to search our local registry (localhost:5000/ubi)
    11. Use skopeo to log out of the local container image registry at localhost:5000

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans