Slides on how to run containers - Part of RHCSA (RH134) syllabus
Size: 2.16 MB
Language: en
Added: Sep 21, 2024
Slides: 27 pages
Slide Content
Run Containers
Container
●From shipping containers, the concept of 'container' began.
●Travel globally with consistent measurements.
●Global infrastructure easily handles these standardized containers.
●Resulting in universal ease of transportation and storage.
Lightweight, portable units of software that package code and dependencies
together
What are containers?
Container Softwares
Released on: March 20th 2013
Released on: August 2018
Developed by : Solomon Hykes
Developed by :
Docker vs Podman
Docker Podman
Support in RHEL 8 Not Supported by RHEL 8 An alternative to Docker in RHEL 8
Service
Management
Controlled through native Linux service
management tools
Utilizes native Linux service management tools
Daemon Uses a daemon (background process) Runs as a user process (no daemon)
Rootless Requires root privileges Supports rootless mode
Security Relies on containerd and runc Uses its own libraries for container management
Compatibility
Works well across various operating
systems
Primarily designed for Linux systems
Image formats Uses Docker image format
Supports multiple image formats including
Docker
● Podman: Manages pods and containers (run, stop, start, etc.)
● Buildah: Builds, pushes, and signs container images
● Skopeo: Copies, inspects, deletes, and signs images
● runc: Provides run and build features for Podman and Buildah
● crun: Optional runtime offering flexibility and security for rootless
containers.
Red Hat CLI tools
Podman Container Terms
●Images: Templates used to create
containers, which can be converted back to
images
●Pods: Groups of containers deployed
together on a host, symbolized by the three
seals in the Podman logo
Podman commands
Install podman on rhel
●Command : dnf install podman -y
Check podman version
●Command : podman version
To get info about all commands in podman
●Command : podman help
Get detailed information about the Podman env., including the system
conf, runtime information, and other relevant details
●Command : podman info
On scrolling down in podman info you’ll get what all registry it is using
Search image in registries
●Command : podman search httpd
Display Logs Of Recently Created Containers
●Command : podman logs -l
Download the amd64 Version of the httpd Image from Docker Hub
●Command : podman pull docker.io/amd/httpd
Download the Default httpd Image from Docker Hub
●Command: podman pull httpd
List All Available Images on Your Local System
●Command: podman images
Removes The Specified Image
●Command : podman rmi docker.io/amd64/httpd
Run an httpd Container and Expose it on Port 8080
●Command:podman run -d -p 8080:80/tcp --name http_container httpd
Run an Interactive httpd Container and Expose it on Port 8081
●Command: podman run -it -p 8081:80/tcp --name 2_http_container httpd
List All Running Containers
●Command: podman ps
List All Containers (Running and Stopped)
●Command:podman ps -a
Stop a running container
●Command: podman stop http_container
Start a Stopped Container
●Command: podman start http_container
Remove a Container
●Command: podman rm http_container
View Logs of a Container
●Command: podman logs http_container