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

Manage Podman Containers Using Cockpit on RHEL

Cockpit is an easy-to-use, web-based system management tool for Linux servers that can manage Podman containers with the cockpit-podman plugin. In this lab, we will install Cockpit and the cockpit-podman plugin and will use Cockpit to manage Podman containers. Upon completion of this lab, you will be able to configure a Cockpit installation and use it to manage your Podman containers.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 45m
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 Cockpit and the 'container-tools' Module

    Perform the following:

    1. Install the container-tools application stream.

    2. Install cockpit.

    3. Use enable and start the cockpit.socket socket using systemctl.

    4. Now we can connect to the Cockpit web console on port 9090. Let's log in as cloud_user.

    5. You'll notice that we get a message that the "Podman service is not active." Let's start it.

    Now that we're good to go, we see that we have no containers or images. Let's change that!

  2. Challenge

    Use Cockpit to Download Container Images

    Connect to the Cockpit web console. Let's log in as cloud_user.

    Let's take a look at the tab for the Podman containers plugin.

    You'll notice that we get a message that the "Podman service is not active." Let's start it.

    First, let's grab some images. We'll grab the following:

    • wordpress (from docker.io/library/wordpress)
    • mariadb (from docker.io/library/mariadb)

    Let's use our images to start some containers!

  3. Challenge

    Start a WordPress Container Instance Using Cockpit

    We're going to start a WordPress installation, using two containers:

    Start a mariadb container:

    • Name the container wp-db.
    • Publish port 3306 in the container to port 3306 on the host.
    • Use the mariadb container image.
    • Set the following variables:
      • MYSQL_ROOT_PASSWORD="dbpass"
      • MYSQL_DATABASE="wp"
      • MYSQL_USER="wordpress"
      • MYSQL_PASSWORD="wppass"

    Start a WordPress container:

    • Name the container wp-web.
    • Publish port 80 in the container to port 8080 on the host.
    • Use the wordpress container image.
    • Set the following variables:
      • WORDPRESS_DB_NAME="wp"
      • WORDPRESS_DB_USER="wordpress"
      • WORDPRESS_DB_PASSWORD="wppass"
      • WORDPRESS_DB_HOST="enter the private IP address of host"

    Now that our containers are up and running, let's test them!

  4. Challenge

    Test Our WordPress Installation and Clean Up!

    Let's try connecting to our WordPress installation using the external DNS or IP address of our server and port 8080.

    You should get the WordPress setup page. When you're done testing, clean up all the containers and images.

    Great work, Cloud Guru! You stood up a WordPress instance using Cockpit and the Podman plugin!

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