Fedora 41
Sponsored Link

Podman : Add Container Images2024/11/06

 

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      99519fcf3c1b  17 hours ago  163 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

e4c80083f156  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  23 seconds ago  Exited (0) 7 seconds ago                laughing_mestorf

# add the image that [httpd] was installed

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

Getting image source signatures
Copying blob 407c0fd4d81c skipped: already exists
Copying blob a8d61339b9e2 done   |
Copying config 4dfbd95b4e done   |
Writing manifest to image destination
4dfbd95b4ef60793535fddaecf2cb7031844705656d5f68dc28f7aa4abba157c

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG         IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest      4dfbd95b4ef6  19 seconds ago  319 MB
registry.fedoraproject.org/fedora  latest      99519fcf3c1b  17 hours ago    163 MB

# confirm [httpd] to run a container

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

Server version: Apache/2.4.62 (Fedora Linux)
Server built:   Aug  1 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.3, 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