CentOS Stream 9
Sponsored Link

Podman : Add Container Images2022/03/14

 
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  stream9     44ffcc4acee8  3 days ago  152 MB

# run a container and install [httpd]

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

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

9724f08d90ac  quay.io/centos/centos:stream9  /bin/bash -c dnf ...  56 seconds ago  Exited (0) 11 seconds ago               suspicious_carver

# add the image that [httpd] was installed

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

Getting image source signatures
...
...
Writing manifest to image destination
Storing signatures
0c6c507d6e956f286a623090a0316a3073999bb70d288058de82df6d794e4366

# show container images

[root@dlp ~]#
podman images

REPOSITORY              TAG         IMAGE ID      CREATED         SIZE
srv.world/centos-httpd  latest      0c6c507d6e95  24 seconds ago  253 MB
quay.io/centos/centos   stream9     44ffcc4acee8  3 days ago      152 MB

# confirm [httpd] to run a container

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

httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd /usr/share/man/man8/httpd.8.gz
Matched Content