Bsics of Container Images
Bsics of Container Images
2. podman version
#podman version
6. Listing container:
>To list all running containers on your system.
#podman ps
>If you want to see all containers, including those that have been stopped
#podman ps -a
8. The podman run command is used to create and start a new container from a
specified image.
a. #podman run -d <image_id>
exa: podman run -d 123abc456def
b. Naming the Container: Use the --name flag to give your container a specific
name.
#podman run -d --name my-container 123abc456def
c. Port Mapping: If your container exposes a port, you can map it to the host
using the -p flag.
#podman run -d -p 8080:80 123abc456def
c. Force Removal:
#podman rmi -f <image_id_or_name>
a. Saving an Image
#podman save -o <filename>.tar <image_name_or_id> (syntax)
(-o <filename>.tar: Specifies the output file name where the image will be
saved.
<image_name_or_id>: The name or ID of the image you want to save.)
b. Loading an Image
#podman load -i <filename>.tar (syntax)
(-i <filename>.tar: Specifies the input file from which the image will be
loaded.)