Customizing and Launching an Existing Container Image

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab scenario, you will be searching an image registries, pulling images, modifying containers, saving modified containers, and publishing a container image. Upon completion of this lab, you will have the knowledge and skills required to locate images, modify containers, and publish a new image to a registry.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Locate an Image and Run a Container
  • Log in to server-1 with the cloud_user account.
  • Find the nginx image and tag hosted on the private registry server-1:5000. Search is disabled, and the registry requires authentication.
  • Pull the nginx image from registry server-1:5000.
  • Start a container using the nginx image. Name the container web-dev, and map host port 8081 to container port 80.
Modify a Container and Push a New Image
  • Copy the contents of the tar archive /home/cloud_user/llama_cart.tar to web-dev:/usr/share/nginx/html/.
  • Commit the container web-dev to a new image named web-dev with a tag of v1.
  • Tag web-dev:v1 as server-1:5000/llama-racing:v1.
  • Push the new image to the registry on server-1:5000.
Start a Container and Verify Changes
  • Start a new container using the server-1:5000/llama-racing:v1 image. Name the new container llama-racing-web, and map host port 8080 to host port 8081.
  • Verify the containers and images by starting the container named checker. Use the -i option when starting the container.
  • Use a web browser to check the web page using the public IP address for server-1 and port 8080.

Additional Resources

In this scenario, you have been asked by a team lead to help customize a container image that they will be using to train some new employees. They would like you to do the work on a system they have provided you access to. You will need to log in to the test system named server-1. Once you have logged on, locate the special nginx image hosted on the private registry server-1 running on port 5000. Run and modify a container using the nginx image. After making your modifications, save those changes to a new image named web-dev with a tag of v1. You will then need to push this image as server-1:5000/llama-racing:v1 into the same private registry.

After pushing your image, start a container named llama-racing-web, and run the special container checker to verify your work. Good luck, Gurus, and have fun!

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?