Fedora 42
Sponsored Link

Podman : Add Container Images2025/04/25

 

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
registry.fedoraproject.org/fedora  latest      e5bf03515e92  22 hours ago  166 MB

# run a container and install [httpd]

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

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

8e53e2772d02  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  19 seconds ago  Exited (0) 4 seconds ago                unruffled_nightingale

# add the image that [httpd] was installed

[root@dlp ~]#
podman commit 8e53e2772d02 srv.world/fedora-httpd

Getting image source signatures
Copying blob 5510a94e9f42 skipped: already exists
Copying blob c5458db93ee3 done   |
Copying config 512d39041a done   |
Writing manifest to image destination
512d39041a55aab93bceaf5626a8c6b1d4d99135d134902734aee87e5de59eec

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG         IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest      512d39041a55  34 seconds ago  328 MB
registry.fedoraproject.org/fedora  latest      e5bf03515e92  22 hours ago    166 MB

# confirm [httpd] to run a container

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

Server version: Apache/2.4.63 (Fedora Linux)
Server built:   Jan 24 2025 00:00:00
Server's Module Magic Number: 20120211:138
Server loaded:  APR 1.7.5, APR-UTIL 1.6.3, PCRE 10.45 2025-02-05
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)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
.....
.....
Matched Content