0% found this document useful (0 votes)
3 views2 pages

Docker Containerization Assignment Guide

The document outlines a practical assignment on containerizing a simple web application using Docker. It includes steps for creating a website, building a Docker image, running a container, and pushing the project to GitHub, along with a short report on containers, their benefits, and challenges. Expected deliverables include source code, a Dockerfile, a screenshot, and a GitHub repository link.

Uploaded by

Zimba Emmanuel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Docker Containerization Assignment Guide

The document outlines a practical assignment on containerizing a simple web application using Docker. It includes steps for creating a website, building a Docker image, running a container, and pushing the project to GitHub, along with a short report on containers, their benefits, and challenges. Expected deliverables include source code, a Dockerfile, a screenshot, and a GitHub repository link.

Uploaded by

Zimba Emmanuel
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CONTAINERIZATION PRACTICAL ASSIGNMENT

Topic: Introduction to Containers Using Docker

Assignment 1 Term Two: Containerize a Simple Web Application

Objective
To learn how to package and run applications inside containers.

Required Tools
• Docker Desktop
• Visual Studio Code
• GitHub Account

Step 1: Create a Simple Website


Create a folder named 'mywebsite'. Inside it, create an [Link] file containing a simple web
page.

Step 2: Create a Dockerfile


Create a file named Dockerfile and add:

FROM nginx:latest
COPY [Link] /usr/share/nginx/html/[Link]

Step 3: Build the Docker Image


Run: docker build -t mywebsite .

Step 4: Run the Container


Run: docker run -d -p 8080:80 mywebsite

Step 5: Access the Application


Open a browser and visit: [Link]

Step 6: Verify the Container


Run: docker ps and take a screenshot of the running container.

Step 7: Push to GitHub


git init
git add .
git commit -m 'My Docker Website'
git remote add origin YOUR_REPOSITORY_URL
git push -u origin main

Short Report
What are Containers?
Containers are lightweight software packages that include an application and all its dependencies,
enabling it to run consistently across different environments.

Benefits of Containerization
• Fast deployment
• Portability
• Efficient resource usage
• Easy scaling
• Consistent environments

Challenges Encountered
• Installing Docker
• Learning Docker commands
• Configuring ports
• Connecting Docker with GitHub

Expected Deliverables
• Source code
• Dockerfile
• Screenshot of running container
• GitHub repository link
• Short report

You might also like