Difference between revisions of "OPS705 Lab 9"
(First upload of lab instructions.)
Revision as of 22:47, 4 April 2021
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.
Before beginning, you must have:
- Watched the Week 11 video lecture
- Read the Week 11 slides
- Successfully completed Lab 5
- Your Azure Linux VM from Lab 5 (username-lnx)
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:
Write a Dockerfile that does the following:
- Based off httpd:latest
- Has your name and student e-mail as the maintainer
- 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.
- Start a new container instance based off the custom image above
- Use a custom port to expose the container. (Hint: 8080:80)
- Access the website directly in a browser over the Internet from your own machine (not from the VM)
Submit (PNG/JPG) screenshots of the following:
- A browser window connected to your container-based website
- A CLI listing of all container images on your Linux VM (including your custom image)
- 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:
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.