Fedora 37
Sponsored Link

Podman : Add Container Images2022/11/22

 
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      885d2b38b819  11 days ago  190 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

bc43c6d905ed  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  About a minute ago  Exited (0) 38 seconds ago               quirky_hodgkin

# add the image that [httpd] was installed

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

Getting image source signatures
Copying blob cc6656265656 skipped: already exists
Copying blob 479a73595ff5 done
Copying config 87f2afc7b8 done
Writing manifest to image destination
Storing signatures
87f2afc7b89d1f9b0dbd459ca38ecc62ba86e43ecb22d151214df421b4333b11

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG         IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest      87f2afc7b89d  25 seconds ago  458 MB
registry.fedoraproject.org/fedora  latest      885d2b38b819  11 days ago     190 MB

# confirm [httpd] to run a container

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

Server version: Apache/2.4.54 (Fedora Linux)
Server built:   Jul 21 2022 00:00:00
Server's Module Magic Number: 20120211:124
Server loaded:  APR 1.7.0, APR-UTIL 1.6.1, PCRE 10.40 2022-04-14
Compiled using: APR 1.7.0, APR-UTIL 1.6.1, PCRE 10.40 2022-04-14
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
.....
.....
Matched Content