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 thecloud_user
account. - Find the
nginx
image and tag hosted on the private registryserver-1:5000
. Search is disabled, and the registry requires authentication. - Pull the
nginx
image from registryserver-1:5000
. - Start a container using the
nginx
image. Name the containerweb-dev
, and map host port8081
to container port80
.
- Log in to
- Modify a Container and Push a New Image
- Copy the contents of the tar archive
/home/cloud_user/llama_cart.tar
toweb-dev:/usr/share/nginx/html/
. - Commit the container
web-dev
to a new image namedweb-dev
with a tag ofv1
. - Tag
web-dev:v1
asserver-1:5000/llama-racing:v1
. - Push the new image to the registry on
server-1:5000
.
- Copy the contents of the tar archive
- Start a Container and Verify Changes
- Start a new container using the
server-1:5000/llama-racing:v1
image. Name the new containerllama-racing-web
, and map host port8080
to host port8081
. - 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 port8080
.
- Start a new container using the