Creating a Containerized Web Server

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this lab, we will pull an existing container image from a repository, start the container, and expose the web server port to the local host. After completing this lab you will have the knowledge to search for an image, pull the image, and start up a running container by using Podman.

*This lab is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Search for and Pull the NGINX Container Image

First, you will need to find the official NGINX container image to use for the container.

Run a Container Using the NGINX Container Image

Run a container using the NGINX container image. The container should have port 80 exposed to port 8080 on the local host.

Verify the New Container Is Working

Verify that the web server running in the container can be reached on the local host port 8080.

Additional Resources

In this scenario, a client has asked you to set up a small NGINX web server running in a container. The client has provided you with a system that has Podman installed. However, no container images are on the system, and no containers are running on it. An NGINX container image will need to be downloaded and a container started using that image. Port 8080 on the local host should be exposed to port 80 on the container. In the end, you will have a working containerized web server that can be accessed via port 8080 on the server.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?