CentOS Stream 10
Sponsored Link

Podman : Add Container Images2025/01/21

 

Add new Container images you modified settings.

[1] For example, update an official image with installing [httpd] and add it as a new Container image.
# show container images

[root@dlp ~]#
podman images

REPOSITORY             TAG         IMAGE ID      CREATED     SIZE
quay.io/centos/centos  stream10    1ef274445e32  6 days ago  311 MB

# run a container and install [httpd]

[root@dlp ~]#
podman run centos:stream10 /bin/bash -c "dnf -y upgrade; dnf -y install httpd"

[root@dlp ~]#
podman ps -a | tail -1

708bd79b91ed  quay.io/centos/centos:stream10  /bin/bash -c dnf ...  18 seconds ago  Exited (0) 10 seconds ago               happy_rhodes

# add the image that [httpd] was installed

[root@dlp ~]#
podman commit 708bd79b91ed srv.world/centos-httpd

Getting image source signatures
Copying blob 37e999dd80a5 skipped: already exists
Copying blob 28b680b9cfee done   |
Copying config ff38431822 done   |
Writing manifest to image destination
ff3843182253e2420e0e3f72dbf6af669a659c82118d261fd9577664811962be

# show container images

[root@dlp ~]#
podman images

REPOSITORY              TAG         IMAGE ID      CREATED         SIZE
srv.world/centos-httpd  latest      ff3843182253  19 seconds ago  354 MB
quay.io/centos/centos   stream10    1ef274445e32  6 days ago      311 MB

# confirm [httpd] to run a container

[root@dlp ~]#
podman run srv.world/centos-httpd /usr/sbin/httpd -V

Server version: Apache/2.4.62 (CentOS Stream)
Server built:   Oct 29 2024 00:00:00
Server's Module Magic Number: 20120211:134
Server loaded:  APR 1.7.5, APR-UTIL 1.6.3, PCRE 10.44 2024-06-07
Compiled using: APR 1.7.5, APR-UTIL 1.6.3, PCRE 10.44 2024-06-07
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
.....
.....
Matched Content