LabWeek4 GradedAssignment-DockerBasics
LabWeek4 GradedAssignment-DockerBasics
Docker Basics
Table of Contents
Exercise 1 (4 marks)
Submission Instructions
Exercise 2 (6 marks)
Submission Instructions
Solve the given exercises and submit your solutions on LMS within the mentioned due date.
Exercise 1 (4 marks)
1. Create a custom container image in two layers having Ubuntu OS, Apache2 web server and PHP
runtime installed. You can use ubuntu/apache2 image as the base image for this. (2 marks)
2. Push the custom image created in step 1 to your personal DockerHub account (2 marks)
Submission Instructions
Capture screenshots of the following steps and add them to a document. You can submit the
document as a single pdf file on LMS.
1. Display the custom image (having Ubuntu + Apache2 +PHP installed) in your terminal
2. Display the custom image uploaded to your DockerHub
Exercise 2 (6 marks)
Deploy a sample ToDo application using the frontend and database images stored on DockerHub:
Webapp image: https://hub.docker.com/repository/docker/tsdevopsacp/todo-webapp/general
Database image: https://hub.docker.com/repository/docker/tsdevopsacp/todo-db/general
Details below:
● The MySQL database container needs to run with the name ‘db’ and needs to be published on
port 3306.
● The root user password for the database needs to be set to value ‘tsdevopsacp’ using the
environment variable MYSQL_ROOT_PASSWORD.
● The web server within webapp container is hosted on port 80
Once you have deployed both frontend and backend containers, access the app on your local
browser and ensure all pages of the To-Do app are running successfully (home page, info.php page
and todo.php page)
Submission Instructions
Capture screenshots of the following steps and add them to a document. You can submit the
document as a single pdf file on LMS.
1. Display the running ToDo app container
2. Display the running db container
3. Display all the pages of your ToDo application loading successfully on your browser