OPS705 Lab 9

From CDOT Wiki
Jump to: navigation, search

LAB PREPARATION

Purpose / Objectives of Lab 9

In this lab, you will learn the basics of Docker Containers, create a custom container image, and start a new container instance based on that image. This lab is different from previous ones. Instead of step-by-step instructions here, you'll need to watch the Week 11 lecture video and follow the instructions within the demo. The specifications for the lab are below.

Direct link to the lecture video:

While you are working through this lab, it is highly recommended that you write down general notes and commands to help you remember how to do this lab. You may use your notes during tests, so fill it out accordingly!

If you encounter technical issues, please contact your professor via e-mail or in your section's Microsoft Teams group.

Minimum Requirements

Before beginning, you must have:

  1. Watched the Week 11 video lecture
  2. Read the Week 11 slides
  3. Successfully completed Lab 5
  4. Your Azure Linux VM from Lab 5 (username-lnx)

SPECIFICATIONS

In this lab, you must create a custom container image and spin up a new container instance based on that image. Use the video linked as an instructional guide. The specifications of your container image and container instance are as follows:

Custom Image

Write a Dockerfile that does the following:

  1. Based off httpd:latest
  2. Has your name and student e-mail as the maintainer
  3. Copies in a custom HTML index page. The index page must include:
    • Your name
    • Student number
    • E-mail address
    • Your explanation for the difference between a container image and a container instance.

Build the image when complete. Correct any errors.

Container Instance

  1. Start a new container instance based off the custom image above
  2. Use a custom port to expose the container. (Hint: 8080:80)
  3. Access the website directly in a browser over the Internet from your own machine (not from the VM)

Lab Submission

Submit (PNG/JPG) screenshots of the following:

  1. A browser window connected to your container-based website
  2. A CLI listing of all container images on your Linux VM (including your custom image)
  3. A CLI listing of all running container instances on your Linux VM (including your running instance of the custom image)

Submit the following direct files used to create your custom container image:

  1. Dockerfile
  2. index.html

In the Comments text box for your submission on Blackboard, include the URL of your container-based website. Do not zip your submission!

Your professor will review your website directly; the files are a backup in case of catastrophic issues. POWER OFF YOUR VM AFTER SUBMISSION

Labs aren't marked until all files have been submitted.