Containerization
Containerization
Objective:
The objective of this lab is to understand and apply virtualization and containerization
concepts.
td
Detailed Steps:
tl
Pv
1. Set Up a Virtual Machine Using KVM/QEMU:
● Install KVM (Kernel-based Virtual Machine) and QEMU (Quick Emulator) on your
ng
Linux system.
ni
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils
ar
virt-manager
Le
sudo virt-install --name vm_name --memory 2048 --vcpus 2 --disk size=10 --cdrom
/path/to/iso --network bridge=br0 --graphics vnc,listen=0.0.0.0
AF
td
sudo docker run -it ubuntu:latest /bin/bash
tl
● You are now inside the Docker container and can execute commands within the
Pv
container environment.
ng
● Create a Dockerfile to define the configuration and dependencies for building a
Docker image.
ni
ar
# Dockerfile
Le
FROM ubuntu:latest
RUN apt-get update && apt-get install -y \
package1 \
IE
package2 \
...
CMD ["/bin/bash"]
AF
Conclusion:
This lab has provided hands-on experience in virtualization and containerization.
Participants have learned how to set up a virtual machine using KVM/QEMU, install
Docker, pull Docker images, run containers, and work with Dockerfiles and Docker
Compose for container management. These skills are essential for system
administrators, developers, and DevOps engineers to deploy and manage applications in
isolated and lightweight environments.
td
tl
Pv
ng
ni
ar
Le
IE
AF
N
AL