Exercise 1.1 - Pulling and Running Container Images

Return to Workshop

Exercise 1.1 - Pulling Container Images

Section 1: Pull RHEL Images

Step 1. Use the following command to pull a RHEL image from the Red Hat repository:

podman pull command
podman pull registry.access.redhat.com/ubi8

Images are accessed using the container registry URL (registry.access.redhat.com). If the container registry URL is not specified in the pull command, it could result in the retrieval of an image that originates from an untrusted registry.

An image is identified by:

  1. Repository name (registry.access.redhat.com)

  2. Namespace name (ubi8) and

  3. Image name .

  4. Optionally, a tag can be added (which defaults to :latest if not entered) to ensure retrieval of the required image.

(There can be multiple versions of the same image, within the registry. A specific version can be selected by adding a tag, such as :latest to form a name such as rhel7:latest or ubi8:8.7-231.)

Step 2. Try the Skopeo command

Skopeo provides the ability to inspect containers stored in a registry. The Inspect feature displays details of the selected container. The 'skopeo inspect' command’s ability to list all the tags associated with a selected container is a benefit over the docker tool.

skopeo inspect docker://registry.access.redhat.com/ubi8

Step 3. Try the Podman command

Podman can be used to see what container images are in the local repository:

podman images
REPOSITORY                         TAG      IMAGE ID       CREATED      SIZE
registry.access.redhat.com/ubi8    latest   7a840db7f020   2 days ago   211MB

Section 2: Inspecting the container tools environment

Now that you have the Linux container tools installed, with a few containers available, you can start investigating what makes up a container.

Run podman info option to check the container environment details.

podman info command
podman info
host:
  MemFree: 1050951680
  MemTotal: 1926369280
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 1
  hostname: ip-10-0-2-211.ec2.internal
  kernel: 4.18.0-862.3.2.el7.x86_64
  os: linux
  uptime: 19h 36m 30.42s (Approximately 0.79 days)
insecure registries:
  registries: []
registries:
  registries:
  - registry.access.redhat.com
store:
  ContainerStore:
    number: 0
  GraphDriverName: overlay
  GraphOptions:
  - overlay.override_kernel_check=true
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
  ImageStore:
    number: 0
  RunRoot: /var/run/containers/storage

Workshop Details

Domain Red Hat Logo
Workshop
Student ID

Return to Workshop