Fedora 39
Sponsored Link

Podman : Add Container Images2023/11/16

 
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      ec546109f822  8 days ago  183 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

36270cd18f92  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  About a minute ago  Exited (0) 21 seconds ago               angry_austin

# add the image that [httpd] was installed

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

Getting image source signatures
Copying blob a239607b08d4 skipped: already exists
Copying blob aab4bc2b54d5 done   |
Copying config 43a608e50b done   |
Writing manifest to image destination
43a608e50bc8585914038b209b3ee2452bedb5831a12133399a4b5d0ee5ecf82

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG         IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest      43a608e50bc8  31 seconds ago  459 MB
registry.fedoraproject.org/fedora  latest      ec546109f822  8 days ago      183 MB

# confirm [httpd] to run a container

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

Server version: Apache/2.4.58 (Fedora Linux)
Server built:   Oct 20 2023 00:00:00
Server's Module Magic Number: 20120211:129
Server loaded:  APR 1.7.3, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11
Compiled using: APR 1.7.3, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
.....
.....
Matched Content