Launching an Nginx Container

15 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will be pulling a specific Nginx container image and then using that image to start a new container with port mappings. Upon completion of this lab, you will have the knowledge and skills required to start a new Nginx container, map host ports to container ports, and assign a name to a Docker container.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Pull an Image
  • Log in to server-1 using the cloud_user account.
  • Pull the Nginx image with the tag of 1.22
Start a Container
  • Start a new container using the nginx:1.22 container image.
  • Name the container web-1.
  • Map the container port 80 to host port 8080.
Verify the Container Is Working
  • Use curl to access server-1:8080 to verify the container is running.
  • Use a web browser and the public IP address of server-1 to check that the container is running on port 8080.

Additional Resources

Hello Gurus, in this scenario, you have been asked by a colleague to set up a new Nginx container on their server named server-1. They have provided you with the credentials for the cloud_user account in order to complete this request. They have specified that they would like the container to use the official Nginx container image with the tag 1.22. The container should be given the name of web-1. In addition, they would like the container port 80 to be mapped to port 8080 on server-1. Good luck, 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?