SE-210: Software Design and Architecture
Class: BESE 14A
Lab 13: DOCKER
Name
M. Ahmad Raza
Qalam
466747
SUBMITTED TO:
LE Ms. Sundas Dawood
Lab 13: Docker
Lab Task
SE-211: Software Design and Architecture Page 1
Task 1:
1. Pull the Nginx image from the docker registry.
Screenshot:
2. run the “docker images” command to check the images available on the system.
Screenshot:
3. Create a container from the Nginx image. [Container is the running instance of the
image -> docker run <image>]
Screenshot:
SE-211: Software Design and Architecture Page 2
SE-211: Software Design and Architecture Page 3
4. Explain in one line the output of creating the container.
Answer:
The output shows that the NGINX container started in the foreground, executed its startup
routines, and then shut down gracefully after receiving a SIGINT (Ctrl+C) signal.
5. Now create the container using -d tag [docker run -d <image>]. What is returned in the
output?
Screenshot:
6. Check the containers on the system. [docker container ls OR docker ps]
SE-211: Software Design and Architecture Page 4
Screenshot:
7. Stop the container [docker stop <Container ID>]
Screenshot:
8. Run the Nginx container on port 3000 [docker run -d -p 3000:80 nginx:latest]. What
does -d tag do?
Screenshot:
Answer:
The -d tag runs the container in detached mode, allowing it to run in the background without
occupying the terminal.
9. Open the browser and go to localhost:3000.
Screenshot:
SE-211: Software Design and Architecture Page 5
10. Explain in one or two lines what is happening by running the docker container?
Answer:
Running the Docker container starts an Nginx web server, which serves a default webpage
accessible at localhost:3000 via port mapping.
Task 2:
Create a Docker Image of a simple API/Static Website/ Recent Project. Share the GitHub Repo
Link of the project with docker file.
[Hints:
1. Create a DockerFile inside the directory and add steps
2. Build the Docker image using “docker build –tag <image-name>: latest
3. Run the container and see your application in action
]
SE-211: Software Design and Architecture Page 6
SE-211: Software Design and Architecture Page 7
Sharing the Github Repo:
Repository URL:
SE-211: Software Design and Architecture Page 8
SE-211: Software Design and Architecture Page 9