0% found this document useful (0 votes)
5 views11 pages

Lecture Notes 1.2.4 (Deleting Containers, Summary Table With Explanations)

The document outlines the importance of deleting Docker containers to free up resources, maintain a clean environment, and enhance security. It provides commands for managing containers, including installation, verification, and deletion processes. Additionally, it includes resources such as video links, textbooks, and reference materials for further learning about Docker and containerization.

Uploaded by

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

Lecture Notes 1.2.4 (Deleting Containers, Summary Table With Explanations)

The document outlines the importance of deleting Docker containers to free up resources, maintain a clean environment, and enhance security. It provides commands for managing containers, including installation, verification, and deletion processes. Additionally, it includes resources such as video links, textbooks, and reference materials for further learning about Docker and containerization.

Uploaded by

245040002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

UNIVERSITY INSTITUTE OF COMPUTING

Master of Computer Application


Cloud Computing & DevOps
Subject Name: Containerization with docker
23CAH-732

DISCOVER . LEARN . EMPOWER


1
Course Outcome
CO3: Analyze the containerization of OS images to
deploy applications over Docker

2
Deleting Containers

Why Delete Containers?


Deleting containers is necessary to:
• Free Up Resources: Remove unused containers to free up system resources.
• Cleanup: Maintain a clean working environment by removing obsolete or redundant
containers.
• Security: Eliminate containers that may contain outdated or vulnerable software
versions.
Deleting Containers

Why Delete Containers?


Deleting containers is necessary to:
• Free Up Resources: Remove unused containers to free up system resources.
• Cleanup: Maintain a clean working environment by removing obsolete or redundant
containers.
• Security: Eliminate containers that may contain outdated or vulnerable software
versions.
Deleting Containers

Commands

· Remove a specific container:


docker rm <container_id>

· Remove all stopped containers:


docker container prune
Summary Table with Explanations

Task Command Example Why It Is Needed


sudo apt-get install docker-ce Set up the Docker platform to run
Install Docker on Ubuntu docker-ce-cli containerd.io containers.

Install Docker on Windows Download and install Docker Enable Docker functionality on a
Desktop Windows environment.

Ensure Docker is correctly


Verify Docker Installation docker --version installed and accessible.

List Containers docker ps / docker ps -a View running or all containers to


manage them effectively.

Start a Container docker start <container_id> Begin execution of a stopped


container.
Summary Table with Explanations

Task Command Example Why It Is Needed

Reboot a container to apply


Restart a Container docker restart <container_id> changes or recover from errors.

docker exec -it <container_id> Interact with the container's file


Access Container Shell /bin/bash system and running processes.

Build a custom environment for


Create Image from Dockerfile docker build -t my-python-app . consistent application
deployment.

docker run -p 4000:80 my- Deploy the application with


Run Container from Image
python-app defined network settings.
Task Command Example Why It Is Needed

docker commit <container_id> Save the current state of a


Commit Container to Image
my_backup_image container as an image for backup.

docker save -o backup.tar Create a portable backup of the


Save Image to Tar File
my_backup_image Docker image.

Restore a Docker image from a


Load Image from Tar File docker load -i backup.tar backup file.
Task Command Example Why It Is Needed

Remove unnecessary containers to


Delete Container docker rm <container_id>
free up resources.

Clean up all stopped containers to


Delete All Stopped Containers docker container prune
maintain a tidy environment
Resources

Video Links:
https://youtu.be/Gjnup-PuquQ
https://youtu.be/wi-MGFhrad0
https://youtu.be/a1M_thDTqmU

Textbooks:
• Nickoloff, Adrian. "Docker in Action." 2nd ed., Manning Publications, 2019.
• Kane, Sean P. "Docker: Up & Running." 2nd ed., O'Reilly Media, 2018.

Reference Books:
1. Turnbull, James. The Docker Book: Containerization is the New Virtualization. 1st ed., James Turnbull, 2014.
2. Freeman, Emily. DevOps for Dummies. 1st ed., For Dummies (Wiley), 2019.

Web Links:
• Docker Documentation
• Docker Tutorial

10
THANK YOU

11

You might also like